I have a column which has a date in the format of MM/dd/YYYY HH:MM:SS AM/PM
. But currently the format is in string type. While loading this data into Oracle table, it is giving me type conversion error
from String to Date type.
I tried to_date()
and date_format()
functions in pyspark but to_date()
is truncating my value to only date MM/dd/YYYY
and date_format()
is keeping it in string only.
Is there any way i change the datatype of my column?