HOUR Function


HOUR Function

Returns the hour from a SAS time or datetime value

Category: Date and Time

Syntax

HOUR (< time datetime >)

Arguments

time

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

datetime

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

Details

The HOUR function returns a numeric value that represents the hour from a SAS time or datetime value. Numeric values can range from 0 through 23. HOUR always returns a positive number.

Examples

The following SAS statements produce these results:

SAS Statements

Results

  now='1:30't;   h=hour(now);   put h;  
  1  

See Also

Functions:

  • 'MINUTE Function' on page 647

  • 'SECOND Function' on page 819




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