Previous Page | Next Page

Formats

YYQw. Format



Writes date values in the form <yy>yyQq, where Q is the separator, the year appears as either 2 or 4 digits, and q is the quarter of the year.
Category: Date and Time
Alignment: right

Syntax
Syntax Description
Details
Examples
See Also

Syntax

YYQw.

Syntax Description

w

specifies the width of the output field.

Default: 6
Range: 4-32
Interaction: When w has a value of 4 or 5, the date appears with only the last two digits of the year. When w is 6 or more, the date appears with a four-digit year.

Details

The YYQw. format writes SAS date values in the form <yy>yyQq, where

<yy>yy

is a two-digit or four-digit integer that represents the year.

Q

is the character separator.

q

is an integer (1,2,3, or 4) that represents the quarter of the year.


Examples

The following examples use the input value of 16601, which is the SAS date value that corresponds to June 14, 2005.

SAS Statements Results
 
----+----1----+
put date yyq4.;
05Q2
put date yyq5.;
 05Q2
put date yyq.;
2005Q2
put date yyq6.;
2005Q2
put date yyq10.;
2005Q2


See Also

Formats:

YYQxw. Format

YYQRw. Format

Previous Page | Next Page | Top of Page