Solved

SSRS export

Posted on 2009-06-29
5
491 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

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

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

Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
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.
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.

697 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