Avatar of HeroOfSparta
HeroOfSparta
 asked on

Change Date format to YYYY-MM-DD in SSRS report .

Hi Gurus,

I have a report designed. The data source for this report is cube. I have a column called date in this report. The present format of the report is MM-DD-YYYY. I want that to be displayed in YYYY-MM-DD format. I played with the textbox properties and expression but it still giving me the same result. Can anyone guide me with this please.
Microsoft SQL Server 2008SSRSSSAS

Avatar of undefined
Last Comment
Jason Yousef

8/22/2022 - Mon
Patrick Tallarico

can you adjust the underlying query to use a converted date?

...convert(120, datefield)...

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

ASKER
Thanks for you reply. But I am extracting from cube and not from the table. I am not sure if I can use above query in my case. I am wrong please explain me in detail .
ASKER CERTIFIED SOLUTION
Jason Yousef

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
HeroOfSparta

ASKER
Thank you verymuch Jason. The expression worked out is : Incase anyone having same problem.

=Format(CDATE( Fields!BadDate.Value ),"yyyy-MM-dd")

Note: I did not tried the hard way yet. As everyone wants easy way :)
I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck
Jason Yousef

Glad that it helped you, see you in another SSRS question :)