You can just simply cast the column to date by following the code given below:
val newDF = df.withColumn("dateColumn", df("timestampColumn").cast(DateType))
df = df.withColumn('dateColumn', df['timestampColumn'].cast('date'))
Note:This solution uses functions available as part of the Spark SQL package, but it doesn't use the SQL language, instead it uses the robust DataFrame API, with SQL-like functions. It doesn’t use less reliable strings with actual SQL queries.