Joshua Scott
Blog Post

Hubspot Date Formatting function for ColdFusion

I am doing a Hubspot integration and they require a very specific format for dates. Their API documentation states:

Date properties will only store the date, and must be set to midnight UTC for the date you want.  For example, May 1 2015 would be 1430438400000 (01 May 2015 00:00:00 UTC). If you try to set a value that is not midnight UTC, you will receive an error.

After working on a solution for a while here is what I came with – and it works!

Taggs:
1 Comment
  • Scott 12:06 pm May 8, 2020 Reply

    Was there a code sample here in the past? Im working with this date string as well and it keeps telling me my string isn’t midnight.

Write a comment