DateFromUnix
The DateFromUnix function converts a Unix timestamp to the date data type in ISO date time format.
The UNIX timestamp is the number of seconds (or milliseconds) elapsed since an absolute point in time, midnight of Jan 1, 1970 in UTC time. This is also known as the Unix epoch, and represents an absolute time.
Syntax
DateFromUnix(seconds)
Function arguments:
seconds (required) The number of seconds since 1970-01-01 00:00:00 UTC.
Notes
- If seconds is
Null, the function returnsNull. - This function is the same as
Date(seconds). - If your data is in milliseconds or microseconds, you can use the DateFromUnixMs or DateFromUnixUs functions.
Examples
DateFromUnix(0)
- Returns
1970-01-01 00:00:00.
DateFromUnix(1503724894)
- Returns
2017-08-26 05:21:34.
DateFromUnix(-100000000)
- Returns
1966-10-31 06:13:20.
Updated 5 days ago
