Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Date-Time format in IF THEN Post Reply Post New Topic
Author Message
mandylyn23
Newbie
Newbie


Joined: 16 Jul 2012
Online Status: Offline
Posts: 6
Quote mandylyn23 Replybullet Topic: Date-Time format in IF THEN
     Posted: 15 Aug 2012 at 12:13pm
I have a report where I am reviewing aging of complaints. Aging is based off the {AWARE_DATE} unless the {PRODUCT_RETURN_DATE} <> 01/01/1900 (default).

I have:

IF {PRODUCT_RETURN_DATE} <> 01/01/1900
THEN
Currentdate - {PRODUCT_RETURN_DATE} >=57
ELSE
Currentdate - {AWARE_DATE} >=57)


But when trying to save this in the Record Selection Formula I get an error stating "A date-time is required here."

I have tried 01/01/00, 01/01/00 00:00:00 with no luck. I also tried putting double quotes.

If this format incorrect for the date to be recognized as 01/01/1900?

Thanks!
IP IP Logged
SonoItaliano
Newbie
Newbie


Joined: 02 Aug 2012
Location: United States
Online Status: Offline
Posts: 9
Quote SonoItaliano Replybullet Posted: 16 Aug 2012 at 2:42am

Not sure if this will work but give it a try anyway:

    IF {PRODUCT_RETURN_DATE} <> DATE(1900,1,1)

Also, check to ensure that your field PRODUCT_RETURN_DATE is really configured as a datetime datatype.
IP IP Logged
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