Using webhooks, I need a date field in milliseconds from the epoch...but I get MM-DD-YYYY. Is there an easy way to get milliseconds from the epoch UTC into a formula?

  • 0
  • 1
  • Question
  • Updated 1 year ago
  • Answered

There are lots of people doing the reverse from the API calls but I need to try and get it into the "Message body" of a Webhook.  I can pick my date using [Invoice Date] but it spits out MM-DD-YYYY.  I also tried to create another field that is formulated from that date...but I don't see any of the options I'm looking for other than parsing the date...then brute forcing the seconds.

Photo of David

David

  • 0 Points

Posted 3 years ago

  • 0
  • 1
Photo of Ⲇanom the ultimate (Dan Diebolt)

Ⲇanom the ultimate (Dan Diebolt), Champion

  • 30,224 Points 20k badge 2x thumb
This formula will return milliseconds as a number:

ToMSeconds ([Date])
Photo of @lin

@lin

  • 840 Points 500 badge 2x thumb
Dan, Is there a way to achieve this with a timestamp (Date and Time) using a QB formula?
Basically I need a Unix timestamp from a QB date and time