Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

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.
 
PREVIOUS NEXT
Tagged: #current #date #pyspark #sql
ADD COMMENT
Topic
Name
6+8 =