SSRS DateString Function

The SSRS DateString function is a Date and Time function that returns the string representation of the current local date according to your system. The syntax of the DateString function to print the current date as the string data type is as shown below.


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

Source Table

SSRS DateString function Example

For this, let me add a new column to the right side of the Hire Date column and name it the DateString. Next, right-click the textbox under DateString 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 the present date. The below SSRS DateString function prints the current local date as per the system in a string format.

SSRS DateString Function expression to print the string format of current local date

Apart from the above, you can use the DateAdd, DateDiff, or DatePart functions to add, delete, and extract parts of the current date. To demonstrate this, add a new column, Diff, and write the expression below. It will find the difference in years between the Hire Date column and the current system date.

=DateDiff("yyyy", Fields!HireDate.Value, DateString())

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

SSRS DateString Function to print the string format of current date according to the local system