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)

    Returns an integer representing the day of the week for a specific date. 1 = Sunday, 2 = Monday and so on.

  • day_in_month(date)

    Returns an integer representing the day of the month for a specific date.

  • day_in_quarter(date)

    Returns an integer representing the day of the quarter for a specific date.

  • day_in_year(date)

    Returns an integer representing the day of the year for a specific date.

  • week_last_day(date)

    Returns the date of the last day of the week for a specific date.

  • year_last_day(date)

    Returns the date of the last day of the year for a specific date.

  • quarter_last_day(date)

    Returns the date of the last day of the quarter for a specific date.

  • month_days(date)

    Returns the number of days in the month for a specific date.

  • quarter_days(date)

    Returns the number of days in the quarter for a specific date.

  • year_days(date)

    Returns the number of days in the year for a specific date.