Functions and CALL Routines |
Returns a SAS date value from year and quarter year values.
-
year
-
specifies a two-digit or four-digit integer
that represents the year. The YEARCUTOFF= system option defines the year
value for two-digit dates.
-
quarter
-
specifies the quarter of the year (1, 2,
3, or 4).
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.
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
|
|
Functions:
|
|
System
Option:
|
Copyright © 2011 by SAS Institute Inc., Cary, NC, USA. All rights reserved.