FORMAT_DATETIME_GMT
Description
Formats a Datetime as a string, based on GMT.
Syntax
FORMAT_DATETIME_GMT(datetime, format_string) -> String
Parameters
| Parameter | Data Type | Required | Description |
|---|---|---|---|
| datetime | Datetime | Yes | The Datetime value to format. |
| format_string | String | Yes | The format pattern applied to the Datetime. |
Example
FORMAT_DATETIME_GMT(NOW(), "yyyy-MM-dd HH:mm:ss")
-- Returns the current Datetime as a string formatted as "yyyy-MM-dd HH:mm:ss" in GMT.Tips
Format patterns: yyyy for year, MM for month, dd for day, HH for 24-hour, hh for 12-hour, mm for minute, ss for second.
Use FORMAT_DATETIME instead to format in the user's local time zone or in a specific time zone.