Solved

SSRS export

Posted on 2009-06-29
5
482 Views
Last Modified: 2013-11-27
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,
0
Comment
Question by:pgmtkl
  • 3
  • 2
5 Comments
 
LVL 17

Expert Comment

by:pssandhu
ID: 24736254
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
 

Author Comment

by:pgmtkl
ID: 24738816
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
 
LVL 17

Accepted Solution

by:
pssandhu earned 500 total points
ID: 24739348
So you are using datestring() function to get the date. Try this:
Cstr(Format(Cdate(Datestring()),"MM/dd/yyyy" ) )
P.
0
 

Author Comment

by:pgmtkl
ID: 24739643
it works with cdate. thanks for your help.
0
 
LVL 17

Expert Comment

by:pssandhu
ID: 24739647
No problem!
0

Featured Post

Control application downtime with dependency maps

Visualize the interdependencies between application components better with Applications Manager's automated application discovery and dependency mapping feature. Resolve performance issues faster by quickly isolating problematic components.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
This article shows gives you an overview on SQL Server 2016 row level security. You will also get to know the usages of row-level-security and how it works
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now