API Workflow : Convert Text to Date? NEED Help

I tried to convert a TEXT “2018-04-15T12:00:33.123Z” to a Bubble DATE to perform some operations on different dates in API Workflow. Someone?


For future readers on a really old post:

Converting Text to date is not impossible. I ran in to an issue where a nested JSON object returned from an API call had an array of data. In my case they were custom fields from Go High Level. The array of custom fields could contain text, another array of text, or even a DATE.

The problem I was running into was that the nested array had different data types so I couldn’t set it as a Date in bubble when initializing the call. So, as far as I could tell “text” was my only option.

Create another API call in the API Connector and create a scheduled api call in the backend workflows and use detect data. In the API Connector create a Parameter with Keys. e.g.
Key: Date - Value: 2023-04-15 and uncheck private
Key: uniqueId - Value: 9852439847294x98237498237424876

The unique id can be any parameter that you can search for to locate what you need to change. You can alter this to locate a table you created and then locate a value to add the date.

When the call is detected from the “detect data” initialization faze of the “backend api workflow” you’ll notice the dropdown showing Date. Bubble does the work. In my case the date format worked but I had to +1day to get it accurate.

Give it a try and let me know how it works for you.

1 Like