Link to home
Start Free TrialLog in
Avatar of aspnetdev
aspnetdev

asked on

How to Fromat Date in Sql Server RDLC

Hi,
I am using a parameter  like this in my report
"For The Period to" & Format(Parameters!parEndingDate.Value,"Short Date") and i get
1/31/2008.How do i format it to get something like January 31,2008.
Thanks,
Avatar of reb73
reb73
Flag of Ireland image

Try -

Format(Parameters!parEndingDate.Value,"MMMM DD, YYYY")
Avatar of aspnetdev
aspnetdev

ASKER

If do that the out put comes  For the Period MMMM DD ,YYYY
Any other suggestions?
Sorry, my mistake.. DD, YYYY should actually be in lower case -

Format(Parameters!parEndingDate.Value,"MMMM dd, yyyy")

The complete list of format codes are available in this link below -

http://thavash.spaces.live.com/blog/cns!CF6232111374DFD2!197.entry
Its coming as MMMM dd,yyyy now.Any other ideas?
Can you retry after removing the comma like -

Format(Parameters!parEndingDate.Value,"MMMM dd yyyy")
Nope that doesnt work either....any more suggestions?
How about -

Format(Parameters!parEndingDate.Value,"MMMM dd") & "," & Format(Parameters!parEndingDate.Value,"yyyy")
ASKER CERTIFIED SOLUTION
Avatar of aspnetdev
aspnetdev

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I should have caught that, didn't realise parEndingDate.Value was not a datetype!