Spark sql timestamp to date. TimestampType using the optionally specified format.