All Places > Content Retirement & Sandbox Private > Ideas > Ideas

Convert Unix Timestamp

score 160
Voted on 18 times. You have not voted. Active



there is no Date/Time conversion function for Unix timestamps:


In QlikView script a possible implementation to convert from a Unix timestamp to the local time could be:


Timestamp = ConvertToLocalTime(Date(MakeDate(1970, 1, 1) + (<timestamp_field> / 86400)), '<time_zone>')




Timestamp = ConvertToLocalTime(Date(25569 + (<timestamp_field> / 86400)), '<time_zone>')


The other way convert to a Unix timestamp is also not very easy because there is no function to convert a local time to UTC time:


Unix timestamps should be handled by a date/time format definition or some extra functions.


- Ralf


Vote history