Hi Everyone, I’m struggling to parse a date value selected in an element to a format which can be used in an API call.
For the API call to work I need a start and end time stamp in the following format: startTimestamp=2024-01-01T00%3A00%3A00Z&endTimestamp=2024-12-30T00%3A00%3A00Z
When I setup the call I manually added parameters like this and it worked fine:
startTimestamp = 2024-01-01T00:00:00Z
endTimestamp = 2024-12-30T00:00:00Z
When looking at the API documentation it allows me to add these values as a test parameter and gives the below format for cURL:
www.endpoint.com/example?startTimestamp=2024-01-01T00%3A00%3A00Z&endTimestamp=2024-12-30T00%3A00%3A00Z
I’ve tried setting the date picker element to a custom format and then just adding “T00%3A00%3A00Z” as arbitrary text afterwards but doesn’t seem to work. I only care about year, month, date for the timestamp so generic seconds etc would be fine.
Thanks for your help!