How to detect format of a Date returned by API and format it as required?

I am trying to fetch data from an API and dumping it inside Supabase.

Here in some cases the date format is mm/dd/yyyy which is not that which can be saved to DB so I want to detect the date format and convert it to yyyy-mm-dd.

How to do this?

Hi @YogiYang :wave: Iā€™m not too sure if this suits, but would something like {{new Date($json['YOUR_FIELD'].toString()).toISOString()}} work for you here? :thinking:

1 Like

Hi @EmeraldHerald ,

Thanks for the tip.

Will try this out and get back here.

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.