SSRS DateValue Function

The SSRS DateValue function is a Date and Time function that takes the date value from the given DateTime and sets the time information to midnight (00:00:00). The syntax of the DateValue function to set the time value to midnight is as shown below.

=DateValue(Fields!StartDate.Value)
=DateValue("January 01, 2024")

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

Source Table

SSRS DateValue function Example

For this, let me add a new column to the right side of the Hire Date column and name it the DateValue. Next, right-click the textbox under DateValue 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 set the time to midnight. The below DateValue function extracts the date value from the HireDate column and sets the time information to midnight for each employee, i.e., 12:00:00 AM (or 00:00:00).

=DateValue(Fields!HireDate.Value)
SSRS DateValue Function expression to return the Date value from DateTime and Set time information as 00:00:00

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

SSRS DateValue Function  preview to return the Date value from DateTime and Set time information as 00:00:00 preview