SSRS export

I am exporting an SSRS report to excel. In one of the textboxes I am using an expresssion to get two dates- current date and the next. datestring and dateadd. On the export for  the one displays as  06-26-2009 and the other 06/29/2009. How can i format them to display the same? it can be - or / in the dates,. as long as they match,
pgmtklAsked:
Who is Participating?
 
pssandhuConnect With a Mentor Commented:
So you are using datestring() function to get the date. Try this:
Cstr(Format(Cdate(Datestring()),"MM/dd/yyyy" ) )
P.
0
 
pssandhuCommented:
Use the Format() function to format the dates and use the CDate to convert the field to a date if not stoed as date datatype:
Format(Cdate(Fields!DateField.Value),"MM/dd/yyyy" )
Hope this helps.
P.
0
 
pgmtklAuthor Commented:
This is a textbox that does not pull from a field. (it is a custom report header).
I tried =(fromat(datestring(), "mm/dd/yyyy")) but that doesnt work. WHat do i need to modify?
0
 
pgmtklAuthor Commented:
it works with cdate. thanks for your help.
0
 
pssandhuCommented:
No problem!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.