Share via


YEAR (Report Builder)

Returns a year value from a datetime.

Syntax

YEAR(datetime)

datetime

Specifies the datetime from which the year is extracted.

Example

Formula Result

YEAR(Sell End Date)

Returns the numeric value of the sales week for each instance of the Sell Start Date field, similar to the following:

2002

2005

2003

YEAR(#3/31/2008)

2008

See Also

Concepts

Working with Formulas (Report Builder)
Using Functions (Report Builder)
Date and Time Functions (Report Builder)
Report Builder How-to Topics
Working with Literals in Formulas and Filters (Report Builder)
Formatting Numerical Data (Report Builder)

Help and Information

Getting SQL Server 2005 Assistance