Vai al contenuto

Date and time literals

Date and time literals are defined by specifing the type name, the sharp character and the desired value; the value format depends on the specific data type, as shown in the table below:
TypeExampleExplanation
DATEDATE#1980-01-0532 bits value.YYYY-MM-DD
LDATELDATE#1980-01-0564-bit value.YYYY-MM-DD
DATE_AND_TIMEDATE_AND_TIME#1980-01-05-00:05:10orDT#1980-01-05-00:05:10.12332 bits value.YYYY-MM-DD-hh:mm:ss.msMilliseconds are optional, so a valid declaration can stops to seconds.YYYY-MM-DD-hh:mm:ss
LDATE_AND_TIMELDATE_AND_TIME#1980-01-05- 00:05:10.123456orLDT#2080-01-05-20:05:10.123_456_78964 bits value.YYYY-MM-DD-hh:mm:ss.nsMilliseconds, microseconds and nanoseconds are optional, so a valid declaration can stops to seconds.YYYY-MM-DD-hh:mm:ss
TIMETIME#20d5h4m7s20ms32 bits value.
LTIMELTIME#105d5h4m7s20ms50us30ns64 bits value.
TIME_OF_DAYTOD#13:40:55.12332 bits value. hh:mm:ss.msMilliseconds are optional, so a valid declaration can stops to seconds.hh:mm:ss
LTIME_OF_DAYLTOD#13:40:55.12345678964 bits value. hh:mm:ss.nsMilliseconds, microseconds and nanoseconds are optional, so a valid declaration can stops to seconds.hh:mm:ss