Print Page | Close Window

Date problem

Printed From: Crystal Reports Book
Category: General Information
Forum Name: Announcements
Forum Discription: Please check this section for the latest announcements from Crystal Reports Forum
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=15970
Printed Date: 03 May 2025 at 7:57am


Topic: Date problem
Posted By: Rhonda
Subject: Date problem
Date 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



Replies:
Posted By: kevlray
Date 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.


Posted By: Rhonda
Date Posted: 26 Mar 2012 at 8:13am

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



-------------
Thank you,
Rhonda



Print Page | Close Window