Chapter Contents

Previous

Next
YEAR

YEAR



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
MONTH


Chapter Contents

Previous

Next

Top of Page

Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.