Nóta
Teastaíonn údarú chun rochtain a fháil ar an leathanach seo. Is féidir leat triail a bhaint as shíniú isteach nó eolairí a athrú.
Teastaíonn údarú chun rochtain a fháil ar an leathanach seo. Is féidir leat triail a bhaint as eolairí a athrú.
Extracts microseconds from TIME value.
Syntax
from pyspark.sql import functions as dbf
dbf.time_to_micros(col=<col>)
Parameters
| Parameter | Type | Description |
|---|---|---|
col |
pyspark.sql.Column or column name |
TIME value to convert. |
Examples
from pyspark.sql import functions as dbf
df = spark.sql("SELECT TIME'14:30:00.5' as time")
df.select(dbf.time_to_micros('time')).show()
+--------------------+
|time_to_micros(time)|
+--------------------+
| 52200500000|
+--------------------+