QTR Function


Returns the quarter of the year from a SAS date value

Category: Date and Time

Syntax

QTR ( date )

Arguments

date

  • specifies a SAS expression that represents a SAS date value.

Details

The QTR function returns a value of 1, 2, 3, or 4 from a SAS date value to indicate the quarter of the year in which a date value falls .

Examples

The following SAS statements produce these results.

SAS Statements

Results

  x='20jan94'd;   y=qtr(x);   put y=;  
  y=1  

See Also

Function:

  • 'YYQ Function' on page 918




SAS 9.1 Language Reference Dictionary, Volumes 1, 2 and 3
SAS 9.1 Language Reference Dictionary, Volumes 1, 2 and 3
ISBN: N/A
EAN: N/A
Year: 2004
Pages: 704

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net