| Author |
Message |
Lamy
Newbie
Joined: 14 Jan 2014
Online Status: Offline
Posts: 13
|

Topic: Earliest possible Date accepted by CR Posted: 01 Jul 2014 at 7:57am |
|
Crystal Reports XI
Can someone tell me what the earliest possible date CR supports/recognizes? I need a bogus date as far back as possible so it is clear it is a bogus date. I was using 1/1/1880 and am having issues and someone suggested the date may be to early for CR to recognize.
IF({Dates.LASTPAYDATE}) = '1/1/1880' THEN '' ELSE {Dates.LASTPAYDATE}
When I test it, it does not recognize '1/1/1880' as being a date and tells me a date is required in that spot.
Or is it a format issue that it is not being recognized. If it is I would still like to know the earliest date recognized by CR.
Cheers!
|
|
Thank You, Migwetth, Gunalche’esh, Ha’w'aa, Danke
Kyle
Annalyst/Programmer
"If you shoot Wolves to save the Moose, then you shoot the Moose, you must be crazy or from Alaska"
|
IP Logged |
|
|
|
kevlray
Admin Group
Joined: 29 Oct 2009
Online Status: Offline
Posts: 1587
|

Posted: 01 Jul 2014 at 11:00am |
|
You have two issues. One Crystal will not automatically convert the string to a date, you can use the cdate function ( cdate('1/1/1880' ). Then the if statement has to evaluate to the same data types. This might work for you.
IF({Dates.LASTPAYDATE}) <> cdate( '1/1/1880') THEN {Dates.LASTPAYDATE}
|
IP Logged |
|
Lamy
Newbie
Joined: 14 Jan 2014
Online Status: Offline
Posts: 13
|

Posted: 01 Jul 2014 at 12:49pm |
|
Thanks, It worked like a charm. The actual database field is an 8 char string, and I need the max date so I used TO_DATE in my SQL so have been thinking of it as a date at this point, so it never crossed my mind to cast it as a date in the formula.
Thanks again.
Cheers!
Edited by Lamy - 01 Jul 2014 at 1:23pm
|
|
Thank You, Migwetth, Gunalche’esh, Ha’w'aa, Danke
Kyle
Annalyst/Programmer
"If you shoot Wolves to save the Moose, then you shoot the Moose, you must be crazy or from Alaska"
|
IP Logged |
|
|
|