YYQw. Format

Writes SAS 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

YYQw.

Arguments

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.

Example

The following examples use the input value of 19537, which is the SAS date value that corresponds to June 28, 2013.
Statements
Results
 
----+----1----+
select put(19537,yyq4.);
13Q2
select put(19537,yyq5.);
 13Q2
select put(19537,yyq.);
2013Q2
select put(19537,yyq6.);
2013Q2
select put(19537,yyq10.);
    2013Q2
Last updated: February 23, 2017