Spark sql functions scala. Truncating Date using trunc … import org.