I have a column of VARCHAR format that comes in as 'MM/DD/YYYY 0:00'. I've done a replace 'DATEFROM = REPLACE(DATEFROM,' 0:00','') ' to get rid of the useless time portion.

Then I was trying 'TO\_DATE(DATEFROM::VARCHAR, 'MM/DD/YYYY')' but I get the error 'Can't parse '1/7/2022' as date with format 'MM/DD/YYYY''.

I've tried without the ::VARCHAR which gives the same error. I've also tried TRY\_TO\_DATE which put null into the field.

I've also tried a Trim on the DATEFROM column with the same error occurring.

While I'd like something that would take the 'MM/DD/YYYY 0:00' format and allow me to get to 'YYYY-MM\_DD' but I think that might be a stretch.

Edit: sorry about the typo and not seeing the responses sooner, the year should be YYYY not 3
I'll try the suggestions.