Sorry for the noob question (I'm trying to practice SQL with some databases), but how can I convert the following Excel date formats to MM-DD-YYYY?
The original Excel column is in American format 'MM-DD-YYYY' and it goes to SQL as VARCHAR2:
So, as far as I know, I need to convert it to a number and then use 'TO_DATE()' function (just got the first 50 rows to test):
SELECT TO_DATE(TO_NUMBER(DATE1), 'MM-DD-YYYY') FROM (
SELECT * FROM CHEMICALS2 FETCH FIRST 50 ROWS ONLY
)
and got the error '01843.0000 - Not a valid month'
I also tried to add 41293, after converting to number but got the same error.
Do you have a better idea to format that instead of changing the original csv file?

