Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Date Comparison Post Reply Post New Topic
Author Message
Beso90
Groupie
Groupie
Avatar

Joined: 12 Jun 2014
Location: United States
Online Status: Offline
Posts: 48
Quote Beso90 Replybullet Topic: Date Comparison
    Posted: 16 Jan 2017 at 12:20pm
Hello,
I'm trying to achieve a date comparison formula.

This is my formula but it's not really working:

if {@Ship Date Only} > {@Promise Date Only} then "Yes" else "No"

Can you please help me with this??
IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3702
Quote hilfy Replybullet Posted: 17 Jan 2017 at 3:45am
What are the two date formulas? How is this "not working"?

-Dell
IP IP Logged
Beso90
Groupie
Groupie
Avatar

Joined: 12 Jun 2014
Location: United States
Online Status: Offline
Posts: 48
Quote Beso90 Replybullet Posted: 17 Jan 2017 at 4:29am
it gives me a blank field on some of the dates even though they're later (12/16/2016 and 12/19/2016).

The formulas are:

{@Ship Date Only}:
If isnull ({V_RELEASES_COMB.SHIP_DATE}) then
DATE({V_RELEASES_COMB.ACTUAL_SHIPDATE}) else
DATE({V_RELEASES_COMB.SHIP_DATE})


{@Promise Date Only}:
DATE({V_RELEASES_COMB.PROMISE_DATE})
IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3702
Quote hilfy Replybullet Posted: 17 Jan 2017 at 4:34am
Can V_RELEASES_COMB.PROMISE_DATE be null? If so, that will give you a blank. When you compare anything to null the result is null, not False. That's the way null works.

-Dell
IP IP Logged
Beso90
Groupie
Groupie
Avatar

Joined: 12 Jun 2014
Location: United States
Online Status: Offline
Posts: 48
Quote Beso90 Replybullet Posted: 17 Jan 2017 at 10:57am
Dell,

That cleared my question. Thank you so much!
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.012 seconds.