I wanted to convert from 03FEB23 format to yyyy-mm-dd in python how can I do it?
Use the below code:
from pyspark.sql.functions import *
df=spark.createDataFrame([["1"]],["id"])
df.select(current_date().alias("current_date"), \
date_format("03MAR23","yyyy-MMM-dd").alias("yyyy-MMM-dd")).show()