Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

spark sql convert string to date

spark.sql("""
  SELECT TO_DATE(CAST(UNIX_TIMESTAMP('12/31/2049', 'MM/dd/yyyy') AS TIMESTAMP)) AS newdate"""
).show()
 
PREVIOUS NEXT
Tagged: #spark #sql #convert #string #date
ADD COMMENT
Topic
Name
3+9 =