epoch

Returns the number of seconds since the epoch given a timestamp value.

Example

Return the number of seconds since the epoch for Sales_Date.

epoch(SALES.Sales_Date_dim.Sales_Date)

Syntax

epoch(timestamp expr t)
  • t : timestamp expression

    Returns

    long

Notes

The epoch or “Unix Time” is the time elapsed since January 1, 1970. This function returns the number of seconds elapsed since January 1, 1970 and the specified timestamp argument.


© Incorta, Inc. All Rights Reserved.