pyspark.sql.functions.
current_date
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.
DateType
New in version 1.5.0.
Changed in version 3.4.0: Supports Spark Connect.
Column
current date.
Examples
>>> df = spark.range(1) >>> df.select(current_date()).show() +--------------+ |current_date()| +--------------+ | 2022-08-26| +--------------+