หมายเหตุ
การเข้าถึงหน้านี้ต้องได้รับการอนุญาต คุณสามารถลอง ลงชื่อเข้าใช้หรือเปลี่ยนไดเรกทอรีได้
การเข้าถึงหน้านี้ต้องได้รับการอนุญาต คุณสามารถลองเปลี่ยนไดเรกทอรีได้
Returns the current timestamp without time zone at the start of query evaluation as a timestamp without time zone column. All calls of localtimestamp within the same query return the same value.
Syntax
from pyspark.databricks.sql import functions as dbf
dbf.localtimestamp()
Returns
pyspark.sql.Column: current local date and time.
Examples
from pyspark.databricks.sql import functions as dbf
spark.range(1).select(dbf.localtimestamp()).show(truncate=False)
+-----------------------+
|localtimestamp() |
+-----------------------+
|2022-08-26 21:28:34.639|
+-----------------------+