Python – I have dataframe df with a joiningdate column as String with value 2023-07-19T00:00Z. I want to convert this to timestamp as 2023-07-19 00:00:00. I tried many ways but it populates as null. Please let me know how to get the desired result
df.withColumn(“joiningdate”, to_timestamp(df[“joiningdate”], “yyyy-MM-dd’T’HH:mm:ss’Z'”)
.cast(“timestamp”))