Found this reference … JUST IN TIME!
Thanks Thavash This is by far my most visited page.
http://thavash.spaces.live.com/blog/cns!CF6232111374DFD2!155.entry
Working with Dates in Reporting Services
Command | Result |
FormatDateTime(Parameters!Date.Value,1) | Tuesday, April 10, 2007 |
FormatDateTime(Parameters!Date.Value,2) | 4/10/2007 |
FormatDateTime(Parameters!Date.Value,3) | 12:00:00 AM |
FormatDateTime(Parameters!Date.Value,4) | 00:00 |
…but the better way to do it would be to use …
2) The Format command and specify the exact format you require. For example…
Command | Result |
Format(Parameters!Date.Value,”dd-MM-yyyy”) | 10-04-2007 |
Format(Parameters!Date.Value,”dd/MM/yyyy”) | 10/04/2007 |
Format(Parameters!Date.Value,”MMM-dd-yyyy”) | Apr-10-2007 |
Format(Parameters!Date.Value,”MMM-dd-yy”) | Apr-10-07 |
So 3 M’s give you “Apr” ….anyway this is quite useful if you’re looking for Day/Month/Year , since the system will default to MM/DD/YYYY.
Using this you should be able to display the date format you want , or send through a particular format to a Stored Proc.
EDITED 22/08/2007 : If the Format Command doesn’t work , try converting the value to a date , eg.
Format(Cdate(Parameters!Date.Value),”dd-MM-yyyy”) |