cancel
Showing results for 
Search instead for 
Did you mean: 

Unix2UTC and UTC2Unix

Super User
342 Views
Highlighted
Super User
Super User

Unix2UTC and UTC2Unix

Here are a couple of quick calculations to convert Unix time to UTC time and vice versa.


Unix2UTC

 

Unix2UTC = 
VAR UnixDays = MAX([UnixTime])/(60*60*24)
RETURN (DATEVALUE("1/1/1970")+UnixDays)

UTC2Unix

UTC2Unix = 
VAR __utc = [Unix2UTC]
RETURN (__utc - DATEVALUE("1/1/1970"))*60*60*24

 

 

 


Did I answer your question? Mark my post as a solution!

Proud to be a Datanaut!