Skip to content

DateTime Type

The DateTime type corresponds to an SQL TIMESTAMP_STRUCT as defined in ODBC.

DateTime types are used for declaring variables for storing date and time values, with an accuracy down to milliseconds.

Range

The valid range for the DateTime type is:

  • Start: 1/1/-32768 12:00:00.000 AM
  • End: 12/31/32767 11:59:59.999 PM

Note that while the DateTime data type can hold any value within this range, other DateTime calculation, manipulation, and storage routines may have different limits. Consult the documentation of the specific routines for additional limitations.

Note

String conversions to DateTime variables are locale-specific, so use the date functions:

to place constant values in a DateTime variable.

For more information, refer to: