Does this code help you? https://github.com/apache/spark/blob/master/sql/core/src/test/java/test/org/apache/spark/sql/JavaDataFrameSuite.java#L156-L194
Kazuaki Ishizaki From: Anton Kravchenko <kravchenko.anto...@gmail.com> To: "user @spark" <user@spark.apache.org> Date: 2017/06/14 01:16 Subject: Java access to internal representation of DataTypes.DateType How one would access to internal representation of DataTypes.DateType from Spark (2.0.1) Java API? From https://github.com/apache/spark/blob/51b1c1551d3a7147403b9e821fcc7c8f57b4824c/sql/catalyst/src/main/scala/org/apache/spark/sql/types/DateType.scala : "Internally, this is represented as the number of days from 1970-01-01."