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

Valid range for the DateTime type is 1/1/-32768 12:00:00.000 AM to 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 other 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, DateSetMonth, DateSetDay, DateSetYear, DateSetHour, DateSetMinute, DateSetSecond and DateSetMillisecond to place constant values in a DateTime variable.

 

For more information, refer to Declaring Variables, the DateTime command and Time and Date Functions.