Hubert-Dudek
Databricks MVP

That's correct for weekday moday=0 for dayofweek Sunday=1.​

​

You can also look for documentation here https://spark.apache.org/docs/latest/api/python/reference/api/pyspark.sql.functions.dayofweek.html

​https://spark.apache.org/docs/latest/api/sql/index.html


My blog: https://databrickster.medium.com/