Answers for "current date in pyspark dataframe"

SQL
1

get current date in pyspark sql

%pyspark

from pyspark.sql.functions import current_date
df1 = df.withColumn("current_date",current_date())

#Where df1 is that dataset you want to add the current date to.
Posted by: Guest on August-20-2020

Code answers related to "SQL"

Browse Popular Code Answers by Language