MONTH Function

Returns the month from a SAS date value.

Category: Date and Time

Syntax

MONTH(date)

Required Argument

date

specifies a numeric constant, variable, or expression that represents a SAS date value.

Details

The MONTH function returns a numeric value that represents the month from a SAS date value. Numeric values can range from 1 through 12.

Example

The following SAS statements produce this result.
SAS Statement
Result
date='25jan94'd;
m=month(date);
put m;
 
1

See Also