2

I'm wondering if there is a setting in SSRS to indicate the date format. We need to show the dates in dd/mm/yyyy format on the reports and from what I can see in database the value has been stored this way. However when I put the data field from the data set (presented by a stored proc), SSRS changes the date to mm/dd/yyyy format!

For example I have contact date in the table as :1972-02-20 00:00:00.000 and want to show it 1972/02/20 on the report, but SSRS shows it as 2/20/1972.

Any idea why and how to fix it?

Thank you.

Cheers, Nazila

3 Answers 3

2

You can use the Format() function to achieve this. If you select the field you want to format and then go to Properties->Expressions you could do something like this:

=Format(Fields!DateCreated.Value,"yyyy/MM/dd")

You can find more information on the Format function below under the Date Functions sub-heading:

http://msdn.microsoft.com/en-us/library/ms157328.aspx

I hope this helps you.

3
  • I noticed MM is different from mm (representing the month) in the format function. At the beginning I had put dd/mm/yyyy which did not show the months correctly. But when changed it to dd/MM/yyyy it works fine. Do you know why?
    – Sky
    Commented Sep 5, 2012 at 7:28
  • 1
    I think that lowercase mm represents minutes for example hh:mm:ss ;-) Commented Sep 5, 2012 at 7:42
  • That make sense now :)
    – Sky
    Commented Sep 5, 2012 at 8:08
5

You can, as stated by Joel, at the report level change te language field (in the properties) but to always get the language used by the user, you can fill in

=User!Language

So the date-format will change to the one matching the user locale.

4

You can set the localisation format at the report level which means you don't have to use the format function every time you drop a date on to the report.

enter image description here

It's not always easy to get to the properties, select "Report" from the properties pane and you should get something like the screenshot above.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.