Solved

Crystal Reports 10 String to Date Problem

Posted on 2004-09-13
6
221 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 500 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Suggested Courses
Course of the Month11 days, 6 hours left to enroll

623 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