SSRS Hour function

The SSRS Hour function is a Date and Time function that will extract the Hour of the day from the given DateTime and return the integer from 0 to 23. The syntax of the Hour function to extract the Hours from the Time information is as shown below.


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

Source Table

SSRS Hour function Example

For this, let me add a new column to the right side of the Hire Date column and name it Hours. Next, right-click the textbox under Hour and choose 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 Hours. The Hour function below extracts the hour of the day value from the HireDate column and returns an integer value from 0 to 23 for each employee.

SSRS Hour Function expression to return hour of the day from the date and time field

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

SSRS Hour Function to return hour of the day from the date and time field preview