Visokio website     Downloads     Video tutorials     KnowledgeBase  
Date/Time: How to convert Unix timestamp? - Visokio Forums
Date/Time: How to convert Unix timestamp?
  •     naruemon December 17, 2013 3:53AM
    In Source file, there has the Unix timestamp which I would like to convert to be datetime format.
    Even I did as suggested in below link:
    http://www.visokio.com/dates-and-times

    It could show datetime but still not valid:
    Ex: Unix Timestamp 1387265894
    Follow the link the result will be: Jan 17, 1970 8:21:05 AM
    Actual value should be : Tue, 17 Dec 2013 07:38:14 GMT

    Moreover, when followed the method as suggested in the link, in 'Field Organizer' the data type still be integer. So we could not use this value to do the calculate in any datetime functions.

    Version: Omniscope 2.9 build 699.
  • 4 Comments
  •     tjbate December 17, 2013 5:06AM
    Mon - Can we see an example file with the data imported as integer? Are you using first a Validate Fields block to import the field as integer, then a separate Field Organiser block to convert the imported integer value to Date/Time using the UNIX/POSIX conversion option?
  •     steve December 18, 2013 1:43AM
    I'd guess that you need to multiply the large integer number by 1000 beforehand. Unix timestamps are often in seconds, but in Omniscope the base unit for dates is milliseconds.
  •     naruemon December 18, 2013 1:57AM
    Please find the attached file.
    Attachments
    test.iok 72K
  •     richard December 18, 2013 5:35AM
    Attached is an updated copy of your file converting Unix timestamps to dates.

    Please note that your regional settings are configured to display dates in "Asia/Bangkok (ICT)".
    Attachments
    test-unix-timestamp.iok 187K

Welcome!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In Apply for Membership