Help with workflow date format

Hello,

Could you please help me on one rule. Here is the use case - I have one workflow where I am printing user’s termination date like

Termination Date - {{$.getIdentity.attributes.terminationSetDate}}

This gets printed in actual email like -
Termination Date - 2023-11-15 01:03:32.174706

Could you please suggest me what change I should do so that I can only print termination date like 2023-11-15 01:03:32 (skip the last nano seconds value)

You can change the data format in your email using Velocity script.

https://velocity.apache.org/tools/devel/apidocs/org/apache/velocity/tools/generic/DateTool.html

Velocity should work as shown by Krishna. You can also define a custom variable to format the date. Looks like your input date is ISO formatted, which means we should be safe to just grab the first 18 characters from the date using a substring operator.

1 Like

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.