pyspark.sql.functions.now¶
-
pyspark.sql.functions.
now
() → pyspark.sql.column.Column[source]¶ Returns the current timestamp at the start of query evaluation.
New in version 3.5.0.
- Returns
Column
current timestamp at the start of query evaluation.
Examples
>>> df = spark.range(1) >>> df.select(now()).show(truncate=False) +-----------------------+ |now() | +-----------------------+ |2022-08-26 21:23:22.716| +-----------------------+