ecx:formatTimestamp
- 1 Minute to read
- Print
- DarkLight
ecx:formatTimestamp
- 1 Minute to read
- Print
- DarkLight
Article summary
Did you find this summary helpful?
Thank you for your feedback
The function ecx:formatTimestamp returns a timestamp in the desired string format. The value returned is a string data type.
Example
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)}
The output is displayed as Tuesday, April 27, 05:12 PM CEST.
Structure
ecx:formatTimestamp(long, timezone, String, Boolean)
Parameters
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. |
Was this article helpful?