Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: IsNull(date) doesn't work Post Reply Post New Topic
Author Message
nmguerra
Newbie
Newbie
Avatar

Joined: 04 Dec 2012
Location: Portugal
Online Status: Offline
Posts: 4
Quote nmguerra Replybullet Topic: IsNull(date) doesn't work
     Posted: 21 Dec 2012 at 6:02am
Hi there. I need a litle help here.

I have this formula on a field that is always returning False, even when the date is Null on the database:

If IsNull({GACCENTRY_1.VALDAT_0}) then
   PrintDate - {GACCDUDATE.DUDDAT_0}
else
   PrintDate - {GACCENTRY_1.VALDAT_0}

also I tried this, and is returning always TRUE...

If Not IsNull({GACCENTRY_1.VALDAT_0}) then
   PrintDate - {GACCENTRY_1.VALDAT_0}
else
   PrintDate - {GACCDUDATE.DUDDAT_0}

I thought to convert the date field to number but I don't know any function that converts date do number.

Can you help me please?
IP IP Logged
nmguerra
Newbie
Newbie
Avatar

Joined: 04 Dec 2012
Location: Portugal
Online Status: Offline
Posts: 4
Quote nmguerra Replybullet Posted: 21 Dec 2012 at 6:11am
I got the answer! :)

I tried this, and it works.

If Len(ToText({GACCENTRY_1.VALDAT_0})) = 0 then
    PrintDate - {GACCDUDATE.DUDDAT_0}
else
    PrintDate - {GACCENTRY_1.VALDAT_0}
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