Date Format Change

Avatar

Avatar

MLong1427

Avatar

MLong1427

MLong1427

02-06-2020

How can I change a date format of a field to use in an output?  This is different from using java in file naming.

 

YYYY-MM-DD hh:mm:ss

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar

Jyoti_Y

MVP

Avatar

Jyoti_Y

MVP

Jyoti_Y
MVP

02-06-2020

Hi,

1) If you are trying to change date format in Email Design :

You can change your date format by using Format expression.

Use below in your HTML code:

data-nl-format="%4Y-%2M-%2D %2h:%2n:%2s"

Something like this: 

<p >Booking Date:<span  data-nl-type="datetime"  data-nl-format="%4Y-%2M-%2D %2h:%2n:%2s">Booking Date </span></p>

 

2) If you are trying to change date format in a workflow, you can use below code:

const FORMAT_120 ="%4Y-%2M-%2D %2h:%2n:%2s"
instance.vars.workflowExecutionInitiatedAt=formatDate(date,FORMAT_120);

 

Thanks

Answers (1)

Answers (1)