หมายเหตุ
การเข้าถึงหน้านี้ต้องได้รับการอนุญาต คุณสามารถลอง ลงชื่อเข้าใช้หรือเปลี่ยนไดเรกทอรีได้
การเข้าถึงหน้านี้ต้องได้รับการอนุญาต คุณสามารถลองเปลี่ยนไดเรกทอรีได้
Create date from the number of days since 1970-01-01.
For the corresponding Databricks SQL function, see date_from_unix_date function.
Syntax
from pyspark.databricks.sql import functions as dbf
dbf.date_from_unix_date(days=<days>)
Parameters
| Parameter | Type | Description |
|---|---|---|
days |
pyspark.sql.Column or str |
The target column to work on. |
Returns
pyspark.sql.Column: the date from the number of days since 1970-01-01.
Examples
from pyspark.databricks.sql import functions as dbf
spark.range(4).select('*', dbf.date_from_unix_date('id')).show()