I have migrated data from old DB to new DB where date was taken as varchar
, I have migrated data successfully but problem in date . In old DB the format of date is 25-01-02
where 25
is day 01
is month and 02
is year. But my script converted it to 2025-01-02
. How can I fix it in my SQL?
TEST case:
DATE OUTPUT
2025-05-01 2001-05-25
2002-08-16 2016-08-02
2031-01-01 2001-01-31
2028-08-16 2016-08-28
2001-05-01 2001-05-01