DTYYQCw. Format

Writes the date part of a datetime value as the year and the quarter and separates them with a colon (:).

Category: Date and Time
Alignment: Right

Syntax

DTYYQCw.

Syntax Description

w

specifies the width of the output field.

Default 4
Range 4–6

Details

The DTYYQCw. format writes SAS datetime values in the form yy or yyyy, followed by a colon (:) and the numeric value for the quarter of the year.

Example

The example table uses as input the value 1665986932, which is the SAS datetime value that corresponds to October 16, 2012, at 06:08:52 p.m..
SAS Statement
Result
----+----1
put date dtyyqc.;
12:4
put date dtyyqc4.;
12:4
put date dtyyqc5.;
 12:4
put date dtyyqc6.;
2012:4

See Also