The function ecx:formatTimestamp returns a timestamp in the desired string format. The value returned is a string data type.
Apply a specific date format to a timestamp and change the time zone to Central European Time (UTC+10:00).
${ecx:formatTimestamp('1272381141000', 'EEEE, MMMMM d, hh:mm aaa', ecm:timeZone('Europe/Berlin'), 'en', true)}
CODE
The output is displayed as Tuesday, April 27, 05:12 PM CEST.
ecx:formatTimestamp(long, timezone, String, Boolean)
Parameter | Description |
---|
long | Specifies the target long integer to format. |
timezone | Specifies the output time zone. |
string | Variable localeCode, applies a country-specific format to the date according to the ISO language code used. |
Boolean | Variable withTimeZone, specifies whether the formatted date includes an abbreviation for the time zone. |