Issue changing string date to date in MYSQL ETL

I'm working on a query where I'm fed in a month name and need to change that into a date. I've formatted the string so that it looks like '2019-11-01' and such, but when I try CAST, STR_TO_DATE, DATE_FORMAT or anything else, I get a blank into the field value. I'm not seeing any errors. Any thoughts on what I could be missing?

 

sqlissue.png

Best Answer

  • jlazerus
    jlazerus Member
    Answer ✓

    I got this to work by changing the format of the date.

     

    STR_TO_DATE(`ReportDate`, "%m/%d/%Y")

Answers

  • jlazerus
    jlazerus Member
    Answer ✓

    I got this to work by changing the format of the date.

     

    STR_TO_DATE(`ReportDate`, "%m/%d/%Y")