date format

Options
Hi Xano Team

I have a date value 20211205(YYYYmmdd) which is a text value which I need to convert to a date format. I used the format_timestamp but the function does not know that the text value is in format (YYYYmmdd) and therefore returns a completely wrong date (1970-01-01T07:36:51+02:00)

The only way I can get this working is to substring the YYYY, the mm and then dd into 3 different variables and once this is done to concat the values to get it into a format like YYYY-mm-dd which then returns the correct results. Can you please confirm if there is a quicker and more effective way of achieving this.

Comments