pyspark.sql.functions.now#
- pyspark.sql.functions.now()[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
>>> from pyspark.sql import functions as sf >>> df = spark.range(1) >>> df.select(sf.now()).show(truncate=False) +--------------------------+ |now() | +--------------------------+ |2023-12-08 15:18:18.482269| +--------------------------+