Current date/time from Handlebars

I am trying to put the current date/time into Salesforce date/time field.
Celigo AI suggested this:
{{dateAdd "" "" "US/Central"}}

CoPilot suggested this:
{{dateFormat "YYYY-MM-DD HH:mm:ss" (now)}}

Grok suggested this:
{{dateFormat "MM/DD/YYYY HH:mm:ss" timeStamp}}

I get errors on all 3 of these and have tried different variations with no luck yet. Any help is appreciated.

Hi @Brad_Wilcox ,

All you need is:

{{timestamp}}
>>>2025-03-07T23:37:03.115Z

If you need formatting or timezones,

{{timestamp "YYYY-MM-DD"}}
>>>2025-03-07
{{timestamp "YYYY-MM-DD hh:mm" "America/Chicago"}}
>>>2025-03-07 05:39

And so on...

1 Like

Thanks Ezriah. This worked.