Report Design
 Crystal Reports Forum : Crystal Reports for Visual Studio 2005 and Newer : Report Design
Message Icon Topic: Convert Date Post Reply Post New Topic
Author Message
pjgreports
Newbie
Newbie
Avatar

Joined: 29 Jul 2011
Online Status: Offline
Posts: 14
Quote pjgreports Replybullet Topic: Convert Date
    Posted: 01 Aug 2011 at 11:19am
I have a field {PAUDIT.DATE} in my report that brings the date displayed as YYYYMMDD.  example: 20110601.  I need to convert date to 06/01/2011/ .  I have tried using CDATE function but i am having no luck unless i am doing something wrong here.  Can anyone help ?
IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3702
Quote hilfy Replybullet Posted: 02 Aug 2011 at 7:26am
Try this:
 
If not IsNull({PAUDIT.DATE}) and {PAUDIT.DATE} <> '' then
Date(ToNumber(left({PAUDIT.DATE}, 4)), ToNumber(mid({PAUDIT.DATE}, 5, 2)), ToNumber(right({PAUDIT.DATE, 2})))
 
-Dell
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.015 seconds.