Workflow notification email template approvedwhen date time format change

Gihan Perera asked on August 12, 2022 10:06

Is there any way to change the Workflow notification email template(workflow.notification) "approvedwhen" date format change? It using macro and I've tried several things like ToShortDateString, FormatDate, etc. nothing works for me

Correct Answer

Brenden Kehren answered on August 12, 2022 16:31

The approvedwhen macro is most likely a string. What I'd suggest is to convert it to a date object, then format the date. Something like the following should work:

{%ToDateTime(approvedwhen).ToShortDateString()%}

0 votesVote for this answer Unmark Correct answer

   Please, sign in to be able to submit a new answer.