Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Results in a Date field.

Status
Not open for further replies.

Lanie

Programmer
Jan 20, 2000
83
US
Good Morning,
We have a report which needs to compare the contract date and ship date, then if the ship date is later than the contract date, we want to show it as late (LT).

Here's my formula for that.

If {CUSTOMER_ORDER_JOIN.WANTED_DELIVERY_DATE}<={CUSTOMER_ORDER_JOIN.REAL_SHIP_DATE}
then "LT"

However, if the two dates are the same I am still getting the LT designation, and what we need is to show it blank.

Can someone help us out with formula...I know it must be something easy, but I just can't figure it out.

Thanks, in advance for you help.
Elaine



Lanie
laniet@ij.net
etroidl@conaxfl.com


 
Try removing the equal sign:

If {CUSTOMER_ORDER_JOIN.WANTED_DELIVERY_DATE}<{CUSTOMER_ORDER_JOIN.REAL_SHIP_DATE}
then "LT"

You might also want to account for orders not yet shipped by changing the formula to:

if (
isnull({CUSTOMER_ORDER_JOIN.REAL_SHIP_DATE}) and
{CUSTOMER_ORDER_JOIN.WANTED_DELIVERY_DATE} < currentdate
)
or
(
{CUSTOMER_ORDER_JOIN.WANTED_DELIVERY_DATE}<{CUSTOMER_ORDER_JOIN.REAL_SHIP_DATE}
)
then "LT"

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top