EPOCH()

EPOCH()

Top  Previous  Next

 

The EPOCH() function returns the internal value of the current date and time in epoch format.

 

 

Format

 

EPOCH()

 

 

The EPOCH() function returns the current date and time in time zone independent epoch format, as a number of seconds since 1 January 1970 UTC. This is equivalent to use of the SYSTEM(1035) function.

 

Because epoch values are defined to be 32 bit integers, there is a limitation that they can only represent times between 13 December 1901 and 19 January 2038. This is a widely recognised issue, potentially more widespread than the "millennium bug", that will require changes to operating systems and run time libraries.

 

 

Example

 

TIMESTAMP = EPOCH()

 

This statement assigns the TIMESTAMP variable with the current date and time in epoch format.

 

 

See also:

DATE(), TIME(), Date, Times and Epoch Values, EPOCH(), MVDATE(), MVDATE.TIME(), MVEPOCH(), MVTIME(), SET.TIMEZONE