Using draft created date in Scripts

My workflow makes use of dates in ordinal format. I use a script to convert the dates. It works fine for current date.

Is there a way that I can use draft created date in the script action?

Here are a couple of ways.

alert(draft.createdAt);
alert(draft.processTemplate("[[created|%d/%m/%Y]]"));

Here are some documentation references to help.

Hope that helps.

1 Like

Thank you very much! And also for sharing the links :slight_smile: