Announcements
 Crystal Reports Forum : General Information : Announcements
Message Icon Topic: Date problem Post Reply Post New Topic
Author Message
Rhonda
Newbie
Newbie


Joined: 23 Mar 2012
Online Status: Offline
Posts: 7
Quote Rhonda Replybullet Topic: Date problem
    Posted: 23 Mar 2012 at 10:26am
Hi,
 
I'm hoping that someone can help me out with a problem I am having with a date.  I am using a new software system where the date is formatted as a number, and comes across as 1120323, being todays date.  Idealy I would like to show it as 03/23/12.
 
Any help would be very much appreciated!
Thank you,
Rhonda
IP IP Logged
kevlray
Admin Group
Admin Group
Avatar

Joined: 29 Oct 2009
Online Status: Offline
Posts: 1587
Quote kevlray Replybullet Posted: 26 Mar 2012 at 6:30am
I have never seen the extra one at the beginning of the number, but the formula below will covert it to string in the format you want.

local stringvar thedate := totext({thedate});

mid(thedate,4,2))+"/"+right(thedate,2)+"/"+mid(thedate,2,2)

Of course {thedate} field would be replaced by your date field.

I hope this helps.
IP IP Logged
Rhonda
Newbie
Newbie


Joined: 23 Mar 2012
Online Status: Offline
Posts: 7
Quote Rhonda Replybullet Posted: 26 Mar 2012 at 8:13am

Thank you so much!  It worked, and you made my day!

Thank you,
Rhonda
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.030 seconds.