Forum Discussion

JIMLIEDER1's avatar
JIMLIEDER1
Qrew Cadet
6 years ago

Epoch & Unix Timestamp Conversion

Is there a formula that will convert the Unix epoch time like '1555079067' to April 12, 2019 2:24:27 PM (GMT)
  • AustinK's avatar
    AustinK
    Qrew Commander
    https://community.quickbase.com/quickbase/topics/how-to-format-a-date-returned-from-api

    That post has what you need, sort of. It has the JavaScript that can do this. I just double checked it the code does work on quickbase still so they are still using/loading that library. It isn't as straight forward as just throwing that in a formula field though.

    The relevant code from there is below. I will try and update this in a bit with how you might use it but this should get you started since you now know you have to use JavaScript. 

    > $.datepicker.formatDate("mm/dd/yy", new Date( parseInt("1435579444018" ,10)) );
    • AustinK's avatar
      AustinK
      Qrew Commander
      What is your use case for this? There are also options in the QuickBase API for using UTC time. msInUTC.

      I don't know if that is at all helpful but I found this when doing a little research into the issue.
    • JIMLIEDER1's avatar
      JIMLIEDER1
      Qrew Cadet
      Sending new Contacts entered in HubSpot to QuickBase using Zapier.  Want to display the date & time the contact was created in HubSpot.  The Contact transaction date & time is in Unix timestamp like '1555079067' 
      • DanielJohnson2's avatar
        DanielJohnson2
        Qrew Trainee

        For anyone looking at this in the post-JavaScript era:

        ToTimestamp(Date(1970,1,1))+Seconds([UNIX Time])



        ------------------------------
        Daniel Johnson
        ------------------------------