How I can format date in report to appear exactly as I want - RDLC

Saleh picture Saleh · Feb 17, 2011 · Viewed 43.4k times · Source

I have a report in my application and this report will show a long date from db and I used this expression to make it shorter:

=FormatDateTime(Fields!StatementDate.Value,DateFormat.ShortDate)

and the date will show like this : 1/1/2010

I need to make it like this : 2010/1/1

How I can do it?

Answer

pcofre picture pcofre · Feb 18, 2011

That expression do the trick

=CDate(Fields!Fecha.Value).ToString("yyyy/M/d")