Link to home
Start Free TrialLog in
Avatar of pgmtkl
pgmtkl

asked on

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,
Avatar of pssandhu
pssandhu
Flag of Canada image

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.
Avatar of pgmtkl
pgmtkl

ASKER

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?
ASKER CERTIFIED SOLUTION
Avatar of pssandhu
pssandhu
Flag of Canada image

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
Avatar of pgmtkl

ASKER

it works with cdate. thanks for your help.
No problem!