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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Show 'This date' if 'other date' doesnt exist 1

Status
Not open for further replies.

rbh123456789

Technical User
Mar 3, 2010
80
CA
CR 11.5

The subject line kind of summerizes what i need to do.
Essentially:

I have 'Order Date', 'Delivery Date' and 'Installation Date' dates that I am working with.

Some records have orders with an Order Date, wbut ith no Delivery or Installation Date. Some Have an Installation Date without a Delivery Date etc.

What i need is a formula to say 'if orderdate is null then show deliverydate and if deliverydate is show installationdate instead.

 
Try the following:

if isnull({table.orderdate}) then
(
if isnull({table.deliverydate}) then
{table.installationdate} else
if not isnull({table.deliverydate}) then
{table.deliverydate}
) else
{table.orderdate}

-LB
 
WOW, thank you! The formula is almost working as i need it.
Since my initial post was not very clear on the ordering, i tried to modify the formula like this:

if not isnull ({table.deliverydate}) then ({table.deliverydate}) else
if isnull ({table.deliverydate}) then ({table.installationdate}) else
if isnull ({table.installationdate}) then ({table.orderdate})
else ({table.orderdate})

The above statement is supposed to say:
Use the DeliveryDate first if it exists. If it doesnt, then show Installationdate. If none of those dates are avilable, show the Orderdate.

The Install and Delivery dates work fine, but the order date is not being displayed..

**the order date is always available for every record.
 
After posting my reply, I ended up just switching two dates in your original formula.

Thank you very much LB!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top