Hubspot date field returns a string, not a timestamp...

I’ve set up a simple module that has a date field.

Here’s a snippet from your docs:

Type: Timestamp 

Description: The Unix Epoch timestamp for the date and time you want to default to. Leave this null to allow the date and time picker to start the content creator at the current date and time in the picker.

When I pprint it to the page I see the following:

event_date=2024-07-06 00:00:00

Any idea why I’m getting a string and not a numerical value?

Hi @AMassingham

HubSpot date fields are displayed in a human readable string format, as 2024-07-06 00:00:00, for easy understanding.

But internally, HubSpot stores date and time values as Unix Epoch timestamps, which represent seconds since 1970-01-01T00:00:00Z.

When retrieving dates via the API or other methods, they may be returned in a human readable string format, making it easier to work with.

This is why API responses often return dates as strings, like “2024-07-06 00:00:00”.

If you need to convert these date strings into Unix timestamps, you’ll need to manually parse the string into a timestamp using a programming language or library based on your convenience.

Hope this helps - Happy to help further!!
Thank you very much and have a great one!
Warm regards