Derives the Unixtime (or epoch time) value from a Datetime value. Source value can be a reference to a column containing Datetime values.

Unix time is a date-time format used to express the number of milliseconds that have elapsed since January 1, 1970 00:00:00 (UTC).

This function factors any timezone values in the inputs.

unixtime(MyDate)

Output: Returns the Unix time values from the MyDate column.

unixtime(datetime_col)


ArgumentRequired?Data TypeDescription
datetime_colYdatetimeName of column whose Unix time values are to be computed

datetime_col

Name of the column whose Unix time value is to be computed.

Required?Data TypeExample Value
YesDatetimemyDate

Example - Unix time generation and formatting