Chapter Contents |
Previous |
Next |
YYQxw. |
Category: | Date and Time |
Alignment: | right |
Syntax | |
Syntax Description | |
Details | |
Examples | |
See Also |
Syntax |
YYQxw. |
Default: | 7 |
Range: | 5-32 |
Interaction: | when no separator is specified by setting x to N, the width range is 4-32 and the default changes to 6. |
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 |
---|---|
YYQw. * | uppercase Q |
YYQCw. | colon |
YYQDw. | dash |
YYQNw. | no separator |
YYQPw. | period |
YYQSw. | forward slash |
*For compatibility with previous versions, the width range of YYQw. without x is 4-6. |
Examples |
The example table uses the input value of 15415, which is the SAS date value that corresponds to March 16, 2002.
SAS Statements | Results |
---|---|
----+----1----+ |
|
put date yyq6.; |
2002Q1 |
put date yyqc6.; |
2002:1 |
put date yyqd6.; |
2002-1 |
put date yyqn5.; |
20021 |
put date yyqp6.; |
2002.1 |
put date yyqs6.; |
2002/1 |
See Also |
Format:
|
Chapter Contents |
Previous |
Next |
Top of Page |
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.