Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add weekday, unix_date Spark function #8720

Closed
acvictor opened this issue Feb 10, 2024 · 0 comments
Closed

Add weekday, unix_date Spark function #8720

acvictor opened this issue Feb 10, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@acvictor
Copy link
Contributor

acvictor commented Feb 10, 2024

Description

weekday
Returns the day of the week for date as 0 = Monday, 1 = Tuesday, …, 6 = Sunday.

Differs from dayofweek which returns the day of the week for date as 1 = Sunday, 2 = Monday, ..., 7 = Saturday.

Spark function docs - https://spark.apache.org/docs/latest/api/python/reference/pyspark.sql/api/pyspark.sql.functions.weekday.html

unix_date
Returns the number of days since 1970-01-01.

Spark function docs - https://spark.apache.org/docs/latest/api/python/reference/pyspark.sql/api/pyspark.sql.functions.unix_date.html

@acvictor acvictor added the enhancement New feature or request label Feb 10, 2024
@acvictor acvictor changed the title Add weekday Spark function Add weekday, unixdate Spark function Feb 12, 2024
@acvictor acvictor changed the title Add weekday, unixdate Spark function Add weekday, unix_date Spark function Feb 12, 2024
facebook-github-bot pushed a commit that referenced this issue Feb 15, 2024
Summary:
Returns the day of the week for date as 0 = Monday, 1 = Tuesday, …, 6 = Sunday.

Addresses #8720

Pull Request resolved: #8721

Reviewed By: Yuhta

Differential Revision: D53811698

Pulled By: mbasmanova

fbshipit-source-id: 818fc9572e48a2d2705a31dbb0b37e2f000f46f1
facebook-github-bot pushed a commit that referenced this issue Mar 1, 2024
Summary:
Returns the number of days since 1970-01-01.

Addresses #8720

Pull Request resolved: #8725

Reviewed By: Yuhta

Differential Revision: D54414733

Pulled By: mbasmanova

fbshipit-source-id: 4535929ce4cfe81757860b54f6fcc9f7542f0b48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant