spark sql convert string to date

Solutions on MaxInterview for spark sql convert string to date by the best coders in the world

showing results for - "spark sql convert string to date"
Natalia
10 Aug 2019
1spark.sql("""
2  SELECT TO_DATE(CAST(UNIX_TIMESTAMP('12/31/2049', 'MM/dd/yyyy') AS TIMESTAMP)) AS newdate"""
3).show()