![]() Chapter Contents |
![]() Previous |
![]() Next |
| YYQRxw. |
| Category: | Date and Time |
| Alignment: | right |
| Syntax | |
| Syntax Description | |
| Details | |
| Examples | |
| See Also |
Syntax |
| YYQRxw. |
| Default: | 5 |
| Range: | 3-32 |
| Tip: | If w is too small to print a four-digit year, only the last two digits of the year print. |
| Details |
The following table shows the separators that correspond to the possible x values:
| Syntax | Separator |
|---|---|
| YYQRw. | uppercase Q |
| YYQRCw. | colon |
| YYQRDw. | dash |
| YYQRNw. | no separator |
| YYQRPw. | period |
| YYQRSw. | forward slash |
| Examples |
The example table uses the input value of 15431, which is the SAS date value that corresponds to April 1, 2002.
| SAS Statements | Results |
|---|---|
----+----1----+ |
|
put date yyqr8.; |
2002QII |
put date yyqrc8.; |
2002:II |
put date yyqrd8.; |
2002-II |
put date yyqrn7.; |
2002II |
put date yyqrp8.; |
2002.II |
put date yyqrs8.; |
2002/II |
| See Also |
| Format:
|
![]() Chapter Contents |
![]() Previous |
![]() Next |
![]() Top of Page |
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.