Convert Unix time stamp

Viewing 3 reply threads
  • Author
    Posts
  • August 2, 2018 at 9:44 AM #30172

    Chris Ju
    Participant

    Hey,

    how can i convert a Unix time stamp to normal date and time?

    Thanks in advance?

    August 2, 2018 at 11:41 PM #30174

    Brendan
    Keymaster

    Hi Chris,

    If you have a field that contains the Unix Epoch time in seconds since January 1, 1970, then you can add a Calculation field which has that field as the only thing in the formula. Then set the Result Type to Date. Tap Forms will convert the value for you and display it as a regular date.

    Thanks,

    Brendan

    August 2, 2018 at 11:46 PM #30175

    Chris Ju
    Participant

    Oh my god, it is so easy! I lost 3 hours yesterday with testing formulas! :-(

    Thank you very much!

    August 3, 2018 at 12:31 AM #30179

    Brendan
    Keymaster

    Hehe… no worries. It’s only easy when you know how :)

    The issue is that the date calculations you do in the formula editor always return a Unix Epoch date value and the Return Type of Date will convert that to a normal date object.

    If you wanted to return a duration, you could subtract an End Date from a Start Date and you’d get the number of seconds in between those two dates. But then you’d need to convert that to a unit that’s appropriate for your task either by dividing or using one of the time based Number Formats.

Viewing 3 reply threads

You must be logged in to reply to this topic.