Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Display date in MM-dd-yyyy format SSRS report

I have a SQL query: select ModifiedDate from Person.Person and this returns the date as 2/24/1998 12:00:00 AM

I'm trying to display this in MM/dd/yyyy format in SSRS report. I have used the expression =Format(Fields!ModifiedDate.Value,"MM/dd/yyyy")

But, still it's coming as 2/24/1998 12:00:00 AM

I want to display this as 2/24/1998.

How can I do this?

like image 977
bapi Avatar asked May 24 '14 07:05

bapi


People also ask

How do I change the date format in SSRS?

Right click - properties on the cell, select format, click the ellipsis "...", and you can see the date formats from there. This will be converted into a date code when you OK the dialog.


1 Answers

I would recommend using the format codes:

Right click - properties on the cell, select format, click the ellipsis "...", and you can see the date formats from there. This will be converted into a date code when you OK the dialog. This is useful as it sets the date in the fomat the user wants to see it in.

To convert the data within SSRS and not the data source you could try using something like:

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

Another sample for you without Cdate:

=Format(Fields!ModifiedDate.Value,"dd/MM/yyyy")
like image 145
n34_panda Avatar answered Sep 22 '22 11:09

n34_panda