Solved

SSRS export

Posted on 2009-06-29
5
492 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

Question has a verified solution.

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

JSON is being used more and more, besides XML, and you surely wanted to parse the data out into SQL instead of doing it in some Javascript. The below function in SQL Server can do the job for you, returning a quick table with the parsed data.
I have a large data set and a SSIS package. How can I load this file in multi threading?
Via a live example, show how to set up a backup for SQL Server using a Maintenance Plan and how to schedule the job into SQL Server Agent.
Via a live example, show how to shrink a transaction log file down to a reasonable size.

707 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