QUARTER( ) Function

Returns the quarter of the year in which a date or datetime expression occurs.

QUARTER(dExpression | tExpression [, nMonth])

Parameters

  • dExpression
    Specifies the Date expression for which you want QUARTER( ) to return a value.
  • tExpression
    Specifies the DateTime expression for which you want QUARTER( ) to return a value.
  • nMonth
    Specifies an optional starting month to the examined quarter. You can use this to specify quarters based on a fiscal rather than a calendar year.

Return Values

Numeric data type. QUARTER( ) returns the quarter of the year in which a date occurs, and the values can be 0, 1, 2, 3, or 4.

Note   QUARTER( ) returns 0 if passed an empty Date or DateTime value, for example, QUARTER({//}).

See Also

CMONTH( ) | DATE( ) | DATETIME( ) | DAY( ) | MONTH( ) | YEAR( )