Format Date and Time in SSRS Report

In this article, we will show you how to Format Date and Time in SSRS Report. It is one of the Frequently asked questions by the users. So, here we will show you the step by step approach to format Date and Time in SSRS Report using the text box properties, and the Expression with an example.

To explain the available SSRS Date format and Time Format options, We are going to use the below-shown DataSet. Please refer to Embedded Data Source and Dataset articles to understand the steps involved in creating Embedded Data Source and Dataset that we used for this SSRS report.

Format Date and Time in SSRS Report 2

And the Custom SQL query that we used in the above Dataset is:

-- Formatting Date and Time on SSRS Report
SELECT [FirstName] +  ' ' + [LastName] AS FullName
      ,[Education]
      ,[Occupation]
      ,[YearlyIncome]
      ,[Sales]
      ,[HireDate]
  FROM [Employee]

Data written by the above query is:

Format Date and Time in SSRS Report 1

Format Date and Time in SSRS Report

To explain the list of SSRS Data format and Time format options, we are going to use below shown report.

Please refer to the SSRS Table Report article to understand the steps involved in creating Table Report, refer to Format-Table Report in SSRS article to understand the formatting. Next, see Add headers and Footer to SSRS Report for adding Page headers and footers.

Format Date and Time in SSRS Report 3

Let me show you the Report Preview. Here, our task is to format the Hire Date column in SSRS Report

Format Date and Time in SSRS Report 4

We had two approaches to format Date and Time in SSRS: one is using the Text Box Properties, and the other is using an expression. Let me explain the First option here, and later we will show the second option.

The first approach to Format Data and Time in SSRS Report

To format the date in SSRS, please select the TextBox containing Date values. In this example, Select Hire Date Text box of the SSRS report, and Right-click on it will open the context menu. Please select the Text Box Properties.. option from it

Format Date and Time in SSRS Report 5

Once we click on the Text Box Properties.. option, a new Text Box Properties window will be opened. Please select the Number tab and then date category.

Format Date and Time in SSRS Report 6

To format date in SSRS, please change the default date time format to Monday, January 31, 2000 1:30 PM

Format Date and Time in SSRS Report 7

As you can see from the below screenshot that our report is displaying the Formatted Date and Time in Hire Date column

Format Date and Time in SSRS Report 8

Again, Let me change the date time format to Monday, January 31, 2000 1:30:00 PM

Format Date and Time in SSRS Report 9

As you can see from the below screenshot that our report is displaying the Date and Time with AM and PM in the Hire Date column. Hope you understand the format date in SSRS

Format Date and Time in SSRS Report 10

This time, we will try the shortest date format 31 Jan 2000

Format Date and Time in SSRS Report 11

Our report preview is displaying the Hire date in the same format.

Format Date and Time in SSRS Report 12

If you observe the Number tab in TextBox properties, we have another category called Time. This category is useful to format time (exclusively). Let me select the format as 31-Jan-00 1:30 PM

Format Date and Time in SSRS Report 18

Our report preview is displaying the Hire date in the same format.

Format Date and Time in SSRS Report 19

Format Date and Time in SSRS Report using Expression

It’s a second approach and the most advanced approach to format data and time in SSRS Report.

SSRS supports Expressions, and it is one of the dominant concepts available for the developers. If your desired format is not in the list of categories, then you can use the Expression to write a custom date and time.

Please select Hire Date TextBox of the SSRS report, and Right-click on it will open the context menu. Please select the Expression.. option from it

Format Date and Time in SSRS Report 13

Once you choose the Expression.. option, a new window called an Expression opens. Under the category section -> Common Functions -> Date and Time, we have many dates and time functions. We can use any of the functions or combinations of functions to achieve the desired result.

Format Date and Time in SSRS Report 14

For this SSRS date format example, we are formatting the Hire date to short date

Format Date and Time in SSRS Report 15

As you can see, the Hire date column is saying that it holds an Expression, rather than Column name Hire date.

Format Date and Time in SSRS Report 16

See our report preview is displaying the same in Hire date column data.

Format Date and Time in SSRS Report 17