Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Crystal Reports 10 String to Date Problem

Posted on 2004-09-13
6
Medium Priority
?
222 Views
Last Modified: 2010-05-18
I have a report that I created from a Faircom database using an ODBC data source. The field I pulled from the database was a date field, but Crystal sees it as just plain text. Since Crystal doesn't see it as a date or time field, then I don't have the date/time formatting options for the field. In order to get Crystal to see it as a date, I have to parse the data then convert it to a date using VB. Since I'm only a novice at VB (can understand most code, can modify existing code, but not yet confident enough to write my own) I need help trying to get this to work. Right now the data on the report looks like "YYYY MM DD", with out the quotes, I want it to look like "MM/DD/YYYY". Any help would be greatly appreciated.
0
Comment
Question by:bstilts
[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
6 Comments
 
LVL 101

Accepted Solution

by:
mlmcc earned 2000 total points
ID: 12051407
try this in a Crystal formula

Date(left({DateField},4), mid({DateField},5,2), Right({DateField},2))
Place the formula on the report and format it as you wish.

You can do it in a similarmanner in VB

mlmcc
0
 
LVL 101

Expert Comment

by:mlmcc
ID: 12560214
Should have solved it.

mlmcc
0
 

Author Comment

by:bstilts
ID: 12705389
I'm sure the above answer would have worked, but I solved the problem myself with just a simple "cdate" function. Sorry "mlmcc" for the late response, but I haven't gotten any feedback on this question in a long time, and since I solved the problem months ago I had forgotten about it.
0
 
LVL 101

Expert Comment

by:mlmcc
ID: 12712377
No problem.

Glad i could help

mlmcc
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses

722 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