pyspark.sql.functions.curdate¶
-
pyspark.sql.functions.
curdate
() → pyspark.sql.column.Column[source]¶ Returns the current date at the start of query evaluation as a
DateType
column. All calls of current_date within the same query return the same value.New in version 3.5.0.
- Returns
Column
current date.
Examples
>>> import pyspark.sql.functions as sf >>> spark.range(1).select(sf.curdate()).show() +--------------+ |current_date()| +--------------+ | 2022-08-26| +--------------+