@DATENOW

Use the @DATENOW function to return the current date and time in the format YYYY-MM-DD HH:MI:SS. For the timezone support, use the ISO 8601 format that is YYYY-MM-DDTHH:MI:SSTZ. The date and time are returned in various outputs, for example in local time zone, local timezone in ISO 8601 format or in timezone region ID. @DATENOW takes no arguments.

Syntax

@DATENOW ()

Examples

Returns the current timestamp with local time zone in ISO 8601 format.

@DATENOW ('LOCAL', 'ISO8601')

Returns the current timestamp in ISO 8601 format.

@DATENOW ('ISO8601')

equivalent to

@DATENOW ('LOCAL', 'ISO8601')

Returns the timestamp with UTC offset in ISO8601 format.

@DATENOW ('+09:00', ISO8601')

Returns the timestamp with the time zone region ID in ISO8601 format.

@DATENOW('America/New_York', 'ISO8601')