Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: bad date string in crystal reports Post Reply Post New Topic
Author Message
kjgreen1112
Newbie
Newbie


Joined: 05 Apr 2010
Location: United States
Online Status: Offline
Posts: 1
Quote kjgreen1112 Replybullet Topic: bad date string in crystal reports
    Posted: 05 Apr 2010 at 1:28am

 

I’m in Crystal.  I have a string “20100402” than I need converted into 04/02/2010.  I’m using CDate(“20100402”) and it doesn’t like that. 

 

It looks like it takes it but then it gives me a bad date srting error.

 

Any help is appreciated.

IP IP Logged
kevlray
Admin Group
Admin Group
Avatar

Joined: 29 Oct 2009
Online Status: Offline
Posts: 1587
Quote kevlray Replybullet Posted: 05 Apr 2010 at 4:47am

You have to break up the string before making it a date.  example:

date(val(left({Date},4)),val( mid({Date},5,2)),val(right({Date},2))). 
 
I hope this helps. 
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.047 seconds.