SSRS Year Function

The SSRS Year function is a Date and Time function that will extract the year from the given DateTime and return an integer value from 1 to 9999. The syntax of the Year function to extract the Years from the Date information is as shown below.

=Year(Fields!OrderDate.Value)

To demonstrate the Year function, we use the Employee table below, which has 15 records. The image shows the records in the Table report.

Source Table

SSRS Year function Example

For this, let me add a new column to the right side of the Hire Date column and name it the Years. Next, right-click the textbox under Year and choose the Expression. To understand the report, I suggest you refer to the articles on SSRS charts and SSRS Dashboard reports from our SSRS tutorial page.

It opens the following expression window to print Years. The below Year function extracts the Year from the HireDate column and returns an integer value between 1 and 9999 for each employee.

=Year(Fields!HireDate.Value)
Function to return year from Date and Time

Please click the preview tab to see the Year function report.

TIP: Please refer to the SSRS DAY and SSRS MONTH methods from the list of available SSRS Date functions.

Year Function to return year from Date and Time fields preview