Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Convert or Parse Number to Date Post Reply Post New Topic
Author Message
bryanarzaga
Newbie
Newbie
Avatar

Joined: 30 Sep 2007
Location: United States
Online Status: Offline
Posts: 4
Quote bryanarzaga Replybullet Topic: Convert or Parse Number to Date
     Posted: 25 Apr 2008 at 8:50am
i have a field in the format of  8042008 i want to convert it into 8/04/2008

what should i do?

knowledge is meant to be shared
IP IP Logged
jkwrpc
Senior Member
Senior Member


Joined: 19 Jun 2007
Location: United States
Online Status: Offline
Posts: 432
Quote jkwrpc Replybullet Posted: 25 Apr 2008 at 9:29am
If this is a standard format for your dates, you could create a formula that would parse the string from the reverse side. You would capture the last 4 digits as the year, the next 2 digits as the day, and remaining as the month. Then reassemble them into the format you want including the slash (/). You will find a discussion of how to do this in the CR Help file under Functions->Strings, then look at the Mid and InStrRev functions.
 
Hope this helps.
 
Regards,
 
John W.
IP IP Logged
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