The util.Datetime class / util.Datetime methods |
Converts a datetime to a number of seconds since Epoch.
util.Datetime.toSecondsSinceEpoch( local DATETIME q1 TO q2 ) RETURNING seconds FLOAT
The util.Datetime.toSecondsSinceEpoch() method converts the DATETIME value passed as parameter to a number of seconds since the Unix Epoch (1970-01-01 00:00:00 GMT)
IMPORT util MAIN DEFINE sec INTEGER, loc DATETIME YEAR TO SECOND LET loc = CURRENT YEAR TO SECOND LET sec = util.Datetime.toSecondsSinceEpoch( loc ) DISPLAY sec END MAIN