Date and time types
Previous  Next

Gladius supports most of the standard SQL date and time types, but they are mapped to the TIMESTAMP type that has a limited precision.

The following table shows the mapped storage type and range for each of the date/time types.
  
Alias
Storage type
Precision
timestamp
TIMESTAMP
1 second, time measured in the number of seconds since the Unix Epoch (January 1 1970 00:00:00 GMT)
date
DATE**
time
TIME**
datetime*
DATETIME**
* = not in SQL92 standard
** = internally stored as TIMESTAMP

Date and time format

All dates and time formats are parsed following the below pattern:

YYYY-MM-DD HH:MM:SS

It corresponds to PHP strftime()'s format string "%Y-%m-%d %H:%M:%S" which is defined as the _G__DATETIME_FORMAT Gladius constant.

TIMESTAMP values must be entered as integer values; all date/time values are internally stored as TIMESTAMP values and converted to formatted strings upon query.

See Date and time for some examples