Use {{dateFormat}} to format a date/time string into a desired output format, optionally specifying how the input is formatted and which time zone to apply.
{{dateFormat oFormat date iFormat timezone}}
-
oFormat (Output Format): The format you want for the final date/time (e.g.,
"MM-DD-YYYY HH:mm","YYYY-MM-DDTHH:mm:ssZ"). -
date: The date to transform (e.g.,
record.orderDateor a string like"1966-25-05 18:36"). -
iFormat (Input Format, optional): The format of the passed-in date if it’s not in standard ISO or another automatically recognized format (e.g.,
"YYYY-DD-MM HH:mm"). -
timezone (optional): A valid time zone ID (e.g.,
"America/Los_Angeles"). If used with a"Z"inoFormat, the output includes the corresponding time zone offset.
Note
-
For current UTC and world time zones, see Wikipedia's list of tz database time zones.
-
For a complete list of all available time and date format codes, see Time and date format codes.
-
For a complete list of all timezones supported by the Celigo platform, see integrator.io supported time zones.
-
Format an ISO date to US style
{{dateFormat "MM-DD-YYYY hh:mm A" record.orderDate}}If
record.orderDateis"2025-03-26T12:34:56Z", the output might be"03-26-2025 12:34 PM". -
Reinterpreting custom input format
{{dateFormat "MM-DD-YYYY hh:mm" record.orderDate "YYYY-DD-MM HH:mm"}}If
record.orderDateis"1966-25-05 18:36", where the day is in the middle, this outputs"05-25-1966 18:36". -
Applying time zone and offset
{{dateFormat "YYYY-MM-DDTHH:mm:ssZ" record.orderDate "" "Asia/Hong_Kong"}}Converts
record.orderDateto Hong Kong time, displaying the offset in the final string (e.g.,+08:00).
Tip
-
Common tokens include
YYYY(year),MM(month),DD(day),HHorhh(hour),mm(minute),ss(seconds),Aora(AM/PM), andZ(time zone offset). -
If the date doesn’t match a known format, use
iFormatto specify how to parse it. OmitiFormatfor standard ISO 8601 inputs. -
When including
"Z"inoFormat, the offset reflects the providedtimezoneif one is specified. If not, it defaults to UTC. -
Time zone IDs follow IANA naming (e.g.,
"America/New_York","Europe/London").