Comparing two dates and two times where nulls exist
I have a problem where I need to compare a date field and time field with another date field and time field. The issue is that the data is dirty and so 3 of the four fields could contain nulls.
I need to do this comparison in order to determine if a delivery is late or on time (including early).
As there are nulls my theory was to 'force' a date or time into the field where there are nulls in order to allow the comparison to work. Unfortunately this doesn't seem to work despite the output looking valid.