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 SSRS 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 charts, tables, grouping, and format tables in SSRS.

Choose the Expression option

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)
SSRS Year Function to return year from Date and Time

Please click the preview tab to see the report. For more functions >> Click Here!

SSRS Year Function to return year from Date and Time fields preview