Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2020 : Report Design
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: 25 Mar 2012 at 9:41am
I am working with a new software system where the date was formatted as a number.  For March 24, 2012, I get 1120324.  There is always a prefaced 1.  Ideally I would like to get 03/24/12.  If anyone can help me get this result, it would be very much appreciated.
Thank you,
Rhonda
IP IP Logged
CircleD
Senior Member
Senior Member
Avatar

Joined: 11 Mar 2011
Location: United States
Online Status: Offline
Posts: 251
Quote CircleD Replybullet Posted: 26 Mar 2012 at 1:20am
In the Select Expert Formula Field:

tonumber({Table.Field})>=datediff('d',date(1916,1,1),currentdate)
IP IP Logged
kostya1122
Senior Member
Senior Member
Avatar

Joined: 13 Jun 2011
Online Status: Offline
Posts: 475
Quote kostya1122 Replybullet Posted: 26 Mar 2012 at 5:32am
try a formula  @date
date(mid({Table.Field},4,2)+"/"+left({Table.Field},2)+"/"+mid({Table.Field},2,2))
IP IP Logged
Rhonda
Newbie
Newbie


Joined: 23 Mar 2012
Online Status: Offline
Posts: 7
Quote Rhonda Replybullet Posted: 26 Mar 2012 at 6:20am
Thank you for the reply.  It returns a true or false result, and no date.
 
tonumber({Table.Field})>=datediff('d',date(1916,1,1),currentdate)


Edited by Rhonda - 26 Mar 2012 at 6:26am
Thank you,
Rhonda
IP IP Logged
Rhonda
Newbie
Newbie


Joined: 23 Mar 2012
Online Status: Offline
Posts: 7
Quote Rhonda Replybullet Posted: 26 Mar 2012 at 6:26am
Thank you very much, however, I am receiving an error 'a string is required here'
 
date(mid({Table.Field},4,2)+"/"+left({Table.Field},2)+"/"+mid({Table.Field},2,2))  
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:31am
I answered your post in the Announcements section.
IP IP Logged
kostya1122
Senior Member
Senior Member
Avatar

Joined: 13 Jun 2011
Online Status: Offline
Posts: 475
Quote kostya1122 Replybullet Posted: 26 Mar 2012 at 6:33am
replace the {Table.Field} with yours if you have then
try
date(mid(totext({Table.Field}),4,2)+"/"+left(totext({Table.Field}),2)+"/"+mid(totext({Table.Field}),2,2))  
IP IP Logged
Rhonda
Newbie
Newbie


Joined: 23 Mar 2012
Online Status: Offline
Posts: 7
Quote Rhonda Replybullet Posted: 26 Mar 2012 at 8:17am
Thank you again, Kostya1122, but it did not work either.  I did recieve a formula from Kevlray, which did work.  So the day has been saved after all.
 
Your posts were very much appreciated.
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.031 seconds.