I have a table with string column named Date which contains the values
(dd-Mon-yy format data and yyyy-mm-dd format data )
01-jan-21
01-feb-21
01-mar-21
2021-01-01
2021-02-01
I was trying to convert it into a date format of yyyy-mm-dd for all the members
to_date(date,'yyyy-mm-dd') but it returns null .
How to convert a string to specific date format as yyyy-mm-dd in Spark SQL?