The SSRS TimeOfDay function is a Date and Time function that returns the current local time of the day according to your system. The syntax of the TimeOfDay function to print the current time is as shown below.
=TimeOfDay()
To demonstrate the TimeOfDay function, we use the Employee table below, which has 15 records. The image shows the records in the Table report.
SSRS TimeOfDay function Example
For this, let me add a new column to the right side of the Hire Date column and name it TimeOfDay. Next, right-click the textbox under TimeOfDay and choose Expression. To understand the report, I suggest you refer to the articles on charts, tables, grouping, and format tables in SSRS.
It opens the following expression window to print the present time. The below SSRS TimeOfDay function prints the current local time of the day as per the system.
=TimeOfDay()
Please click the preview tab to see the report. If you notice the reports, they show the current system local time and the date set to 1/1/00001.
To return the time (only), please change the text box properties from default to Time. For this, right-click on the text box and choose the Text Box properties -> Number -> Time -> Choose the Type (01:30:00 PM). For more functions >> Click Here!