I found the solution. It is as follows:
df2 = df.select('ID', 'starting_timestamp', unix_timestamp('starting_timestamp', "yyyy/MM/dd HH:mm:ss") .cast(TimestampType()).alias("timestamp"))
I am trying to do it in this way, however, the result is null.
df2 = df.select(col('starting_timestamp'), df.starting_timestamp.cast('timestamp').alias('time'))
+-------------------+----+
| starting_timestamp|time|
+-------------------+----+
|2015/0...