cancel
Showing results for 
Search instead for 
Did you mean: 

Formula looking for dates with no value

steverdan
Participant
0 Kudos
386

I am looking for a duel qualifier when it comes to dates. I would like to find all of the orders that shipped late based on

{shipped.date}

{due.date}

SO I got the {shipped.date} > {Due.date} and that returns orders that have shipped late late, but not the ones late that haven't shipped. What do I need to find the null values or blank values in the database.

View Entire Topic
DellSC
Active Contributor
0 Kudos

1. You have to check for null BEFORE you check for a value in a field. When you compare anything to null, the result is null - not true or false - and processing stops there.

2. Your parentheses aren't grouping the statement correctly and the formula can be simplified like this:

{Delivery.Promised_Date} in DateTime (2021, 1, 1, 00, 00, 00) to DateTime (2021, 12, 31, 00, 00, 00)) And
(
  IsNull({Delivery.Shipped_Date}) or
  (
{Delivery.Shipped_Date} in DateTime (2021, 1, 1, 00, 00, 00) to DateTime (2021, 12, 31, 00, 00, 00) and {Delivery.Shipped_Date} > {Delivery.Promised_Date} ) )

NOTE: I used indents to make this easier to read...

-Dell