Print Page | Close Window

Date Comparison

Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2020
Forum Name: Technical Questions
Forum Discription: Formulas, charting data, Crystal syntax, etc.
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=22193
Printed Date: 02 May 2024 at 5:27am


Topic: Date Comparison
Posted By: Beso90
Subject: Date Comparison
Date 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??



Replies:
Posted By: hilfy
Date Posted: 17 Jan 2017 at 3:45am
What are the two date formulas? How is this "not working"?

-Dell

-------------
Proviti, Data & Analytics Practice
http://www.protiviti.com/US-en/data-management-advanced-analytics - www.protiviti.com/US-en/data-management-advanced-analytics


Posted By: Beso90
Date 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})


Posted By: hilfy
Date 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

-------------
Proviti, Data & Analytics Practice
http://www.protiviti.com/US-en/data-management-advanced-analytics - www.protiviti.com/US-en/data-management-advanced-analytics


Posted By: Beso90
Date Posted: 17 Jan 2017 at 10:57am
Dell,

That cleared my question. Thank you so much!



Print Page | Close Window