Converting from a UNIX Timestamp
A Unix timestamp can be converted in Paxata using a Compute statement.
The steps for converting from Unix timestamp to Gregorian date are as follows:
- Click on the Compute icon in the left-hand Tools bar.
- Give your new column a name, such as “Transaction Date”
- Enter this formula:
DATEADD(DATEVALUE("1970-01-01", "yyyy-MM-dd"), @MyUnixTimestampColumn@, "seconds")
- Click Save.
Need to convert the other direction? Convert a datetime value to epoch with this formula:
DATEDIFF(DATEVALUE("1970-01-01 00:00:00","yyyy-MM-dd HH:mm:ss"), @MyDateTimeColumn@ , "seconds")
Not familiar with Unix timestamp format?
The Unix timestamp format is the number of seconds since epoch, which is Thursday, Jan 1, 1970 00:00:00 UTC. For example, May, 28, 2018, 2:29:14 PM Pacific, in a Unix timestamp format is 1527542954