SAS 9.1 Language Reference Dictionary, Volumes 1, 2 and 3

Returns a SAS date value from the year and quarter

Category: Date and Time

Syntax

YYQ ( year,quarter )

Arguments

year

quarter

Details

The YYQ function returns a SAS date value that corresponds to the first day of the specified quarter. If either year or quarter is missing, or if the quarter value is not valid, the result is missing.

Examples

SAS Statements

Results

DateValue=yyq(2001,3); put DateValue; put DateValue date7.; put DateValue date9.;

15157 01JUL01 01JUL2001

StartOfQtr=yyq(99,4); put StartOfQtr; put StartOfQtr=worddate.;

14518 StartOfQtr=October 1, 1999

See Also

Functions:

System Option:

Категории