Can anyone please tell me how to convert char field in format mm/dd/yyyy(allowing for single digits in mm and dd fields) to "YYYY-MM-DD" . IF date is invalid I need to use '1900-01-01' also.
I have tried to cast as cast(string_field as date format 'YYYY-MM-DD') , but got the error as Invalid date.
Thanks