Skip to main content
The following tables show the Date/Time operators that are available for the DATE/TIME/TIMESTAMP data types. See Date/Time types. All the following operators and functions return their values without a time zone.

Date/Time Functions

Notes:
  1. NOW() and CURRENT_TIMESTAMP: When using those functions as part of an INSERT/UPDATE command, the returned value is converted into the column data type it is writing to. When writing into TIME data type, only the time is written, when writing into DATE data type, only the date is written, and when writing to TIMESTAMP data type, the whole timestamp is written. Note that NOW() and CURRENT_TIMESTAMP refer to the time the transaction starts, and not to each statement time inside the transaction
  2. DATE_PART() and EXTRACT() provide similar functionality and accept the same set of units. However, DATE_PART requires the unit argument to be passed as a string (e.g. ‘YEAR”, ‘day’), while EXTRACT() also accepts these units as keywords. The following units are supported:
For a TIMESTAMP object, both the Date and Time units are supported.

Date/Time Operators