QTR Function

Returns the quarter of the year from a SAS date value.

Category: Date and Time
Returned data type: DOUBLE

Syntax

QTR(date)

Arguments

date

specifies any valid expression that represents a SAS date value.

Data type DOUBLE
See <sql-expression>
FedSQL Expressions

Details

The QTR function returns a value of 1, 2, 3, or 4 from a SAS date value to indicate the quarter of the year in which a date value falls.
For more information about how FedSQL handles date and time values, see Dates and Times in FedSQL.

Example

The following statements illustrate the QTR function:.
Statements
Results
select qtr(16983);
3
select qtr(17075);
4

See Also

Functions:
Last updated: February 23, 2017