Built-in Functions → epoch
epoch() is a conversion function that returns the number of seconds since the epoch given a timestamp
value.
Note
The epoch or "Unix Time" is the time elapsed since January 1, 1970.
Signature
epoch(date_timestamp exp)
- date_timestamp exp : The
date
ortimestamp
value
Returns
long
Example
Return the number of seconds since the epoch for Sales_Date.
epoch(SALES.Sales_Date_dim.Sales_Date)