pyspark datetime add hours code example
Example: pyspark datetime add hours
# PYSPARK DATAFRAME API
from pyspark.sql.functions import unix_timestamp
df.select((unix_timestamp(df.timestamp_col) + 3600).cast('timestamp'))
# 1 hour = 60 seconds x 60 minutes = 3600 seconds