Discussions

Expand all | Collapse all

Timestamp to UNIX

  • 1.  Timestamp to UNIX

    Posted 03-27-2018 18:45
    Is there a formula I can use to convert a date/time field to unix format. I need this for an external API call


  • 2.  RE: Timestamp to UNIX

    Posted 03-27-2018 20:17
    If you are using the API_DoQuery call you will get the timestamp in a millisecond format.  You can specify that you want the time to be in UTC use the msInUTC param (in common parameters in the api guide), otherwise you get the local time of the app (in millisecond format).  If you're using API_GenResultsTable you might try looking at Moment.js - they have conversion routines.


  • 3.  RE: Timestamp to UNIX

    Posted 03-28-2018 12:15
    This is an external Post API.
    Here are my options:
    String
    Start time of an assignment in yyyy/MM/dd hh:mm a z or MM/dd/yyyy hh:mm a z format. 
    long
    Start time of an assignment in Unix time

    QB has a start date and a start time and I need to get one of these formats from it.
    Any suggestions?