I am trying to convert a string to date...
STR_TO_DATE(`MFGDTE`,'%Y-%m-%d')
But I am getting the value as 2019-12-18t00:00-06:00. Can you please let me know how to get just the date 2019-12-18.
I am trying to convert a string to date...
STR_TO_DATE(`MFGDTE`,'%Y-%m-%d')
But I am getting the value as 2019-12-18t00:00-06:00. Can you please let me know how to get just the date 2019-12-18.
The
STR_TO_DATE()function actually returns aDateTimeobject, not just aDate, but it's easy to convert to aDateand remove the time component, like this:which will return, e.g.
2019-12-18.