Skip to main content
Question

Timestamp to UNIX

  • March 27, 2018
  • 0 replies
  • 121 views

Forum|alt.badge.img+6
Is there a formula I can use to convert a date/time field to unix format. I need this for an external API call
This topic has been closed for replies.

  • Registered
  • March 28, 2018
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.

Forum|alt.badge.img+6
  • Author
  • Registered
  • March 28, 2018
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?