Timestamp to UNIX

  • 0
  • 1
  • Question
  • Updated 8 months ago
  • In Progress
Is there a formula I can use to convert a date/time field to unix format. I need this for an external API call
Photo of @lin

@lin

  • 820 Points 500 badge 2x thumb
  • Good

Posted 9 months ago

  • 0
  • 1
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.
Photo of @lin

@lin

  • 820 Points 500 badge 2x thumb
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?