How to convert date into YYYY-MM-DD
Summary:
How to convert date 28-FEB-23(DD-MM-YY) into YYYY-MM-DD
Content (required):
Hi Expert,
We are receiving the date like 28-FEB-23 from client ,Now we want to store into the Database but DB accepts only YYYY-MM-DD format.
I have tried with xp20:format-dateTime (ns21:Transaction_date, "YYYY-MM-DD" ) but it didn't work,it is sending empty field to DB.
I have tried with concat (substring-after(substring-after(ns21:Transaction_date,'-'),'-'),'-',substring-before (substring-after (ns21:Transaction_date,'-'),'-'),'-',substring-before(ns21:Transaction_date,'-'))
But in this case the date 28-FEB-23 is getting converted to 23-FEB-28 But still i am not able to insert as it is in YY-MM-DD format.