---
schema_version: "1"
id: 2e6bb09251aeb1fdf93aad266f7ebbdd670edba21bd9e688b87e8ad60d283c38
title: Determine the Day in the Week, Month, Quarter, or Year
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/analytics/bi_dev_guide_saql/guides/concept/bi-saql-functions-timezone-day-in.md
canonical_url: https://developer.salesforce.com/docs/analytics/bi-dev-guide-saql/guide/bi-saql-functions-timezone-day-in.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 848bc88e159aa99728f521c4cdde033ae90c3764f54baa9978c4799a748da3f4
products:
  - Analytics SAQL Developer Guide
  - analytics
---

# Determine the Day in the Week, Month, Quarter, or Year

These functions return the day of the week, month, quarter, or year, the date of the last day of the week, month, quarter, or year, and the number of days in the quarter or year.

- **[day_in_week(date)](https://developer.salesforce.com/docs/analytics/bi-dev-guide-saql/guide/bi-saql-functions-timezone-day-in-week.md)**


    Returns an integer representing the day of the week for a specific date. 1 = Sunday, 2 = Monday and so on.

- **[day_in_month(date)](https://developer.salesforce.com/docs/analytics/bi-dev-guide-saql/guide/bi-saql-functions-timezone-day-in-month.md)**


    Returns an integer representing the day of the month for a specific date.

- **[day_in_quarter(date)](https://developer.salesforce.com/docs/analytics/bi-dev-guide-saql/guide/bi-saql-functions-timezone-day-in-quarter.md)**


    Returns an integer representing the day of the quarter for a specific date.

- **[day_in_year(date)](https://developer.salesforce.com/docs/analytics/bi-dev-guide-saql/guide/bi-saql-functions-timezone-day-in-year.md)**


    Returns an integer representing the day of the year for a specific date.

- **[week_last_day(date)](https://developer.salesforce.com/docs/analytics/bi-dev-guide-saql/guide/bi-saql-functions-timezone-week-last-day.md)**


    Returns the date of the last day of the week for a specific date.

- **[year_last_day(date)](https://developer.salesforce.com/docs/analytics/bi-dev-guide-saql/guide/bi-saql-functions-timezone-year-last-day.md)**


    Returns the date of the last day of the year for a specific date.

- **[quarter_last_day(date)](https://developer.salesforce.com/docs/analytics/bi-dev-guide-saql/guide/bi-saql-functions-timezone-quarter-last-day.md)**


    Returns the date of the last day of the quarter for a specific date.

- **[month_days(date)](https://developer.salesforce.com/docs/analytics/bi-dev-guide-saql/guide/bi-saql-functions-timezone-month-days.md)**


    Returns the number of days in the month for a specific date.

- **[quarter_days(date)](https://developer.salesforce.com/docs/analytics/bi-dev-guide-saql/guide/bi-saql-functions-timezone-quarter-days.md)**


    Returns the number of days in the quarter for a specific date.

- **[year_days(date)](https://developer.salesforce.com/docs/analytics/bi-dev-guide-saql/guide/bi-saql-functions-timezone-year-days.md)**


    Returns the number of days in the year for a specific date.
