📜  在 pyspark sql 代码示例中获取当前日期

📅  最后修改于: 2022-03-11 15:05:16.738000             🧑  作者: Mango

代码示例1
%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.