Language basics / Literals |
Datetime literals define date/time value in an expression.
DATETIME ( dtrep ) qual1 TO qual2[(scale)]
YEAR MONTH DAY HOUR MINUTE SECOND FRACTION
YEAR MONTH DAY HOUR MINUTE SECOND FRACTION FRACTION(1) FRACTION(2) FRACTION(3) FRACTION(4) FRACTION(5)
A datetime literal is specified with the DATETIME() notation, and is typically used in interval or datetime expressions, or to assign a DATETIME variable. In order to get the current date and time, use the CURRENT operator.
MAIN DEFINE d1 DATETIME YEAR TO SECOND DEFINE d2 DATETIME HOUR TO FRACTION(5) LET d1 = DATETIME( 2002-12-24 23:55:56 ) YEAR TO SECOND LET d2 = DATETIME( 23:44:55.34532 ) HOUR TO FRACTION(5) END MAIN