Previous Page | Next Page

Functions and CALL Routines

YEAR Function



Returns the year from a SAS date value.
Category: Date and Time

Syntax
Arguments
Details
Examples
See Also

Syntax

YEAR(date)


Arguments

date

specifies a SAS expression that represents a SAS date value.


Details

The YEAR function produces a four-digit numeric value that represents the year.


Examples

SAS Statements Results
date='25dec97'd;
y=year(date);
put y;

1997


See Also

Functions:

DAY Function

MONTH Function

Previous Page | Next Page | Top of Page