pyspark.sql.functions.
second
Extract the seconds of a given date as integer.
New in version 1.5.0.
Examples
>>> df = spark.createDataFrame([('2015-04-08 13:08:15',)], ['ts']) >>> df.select(second('ts').alias('second')).collect() [Row(second=15)]
previous
pyspark.sql.functions.schema_of_json
next
pyspark.sql.functions.sentences