KNOWLEDGE BASE

Converting String to Date in SparkSQL returns NULLs


Published: 12 Oct 2016
Last Modified Date: 14 Oct 2016

Issue

Converting a SparkSQL String field to a Date field returns NULL values.

Environment

  • Tableau Desktop 
  • Spark SQL

Resolution

Use string functions (LEFT/MID/RIGHT) to reformat the string as "yyy-MM-dd" i.e. "2016-04-15"

 

Additional Information

Spark SQL does not currently support the DATEPARSE() function
Did this article resolve the issue?