Date comparison

  • Thread starter Thread starter Gary Nelson
  • Start date Start date
G

Gary Nelson

In Access2000 I have a query where I am taking the DueDate and comparing it
against the actual ShipDate. If the DueDate is greater than the ShipDate, I
need a True value, otherwise a False value. Can you please offer some
assitance as to how this should appear in my query?
 
Gary,

Try the following:

Newfld:IIf(DateDiff("d",[Dateshipped],[Datedue])
=0,"True","False")

If dateshipped is less than or equal to datedue, value is
true, otherwise value is false.
 
Hi

You need to create a simple calculated field,

OnTime:[DueDate]>[ShipDate]

This will return either -1 or 0, if the condition is True
or False.


hth

Chris
 
Thanks Les, works great!!!
Les said:
Gary,

Try the following:

Newfld:IIf(DateDiff("d",[Dateshipped],[Datedue])
=0,"True","False")

If dateshipped is less than or equal to datedue, value is
true, otherwise value is false.
-----Original Message-----
In Access2000 I have a query where I am taking the DueDate and comparing it
against the actual ShipDate. If the DueDate is greater than the ShipDate, I
need a True value, otherwise a False value. Can you please offer some
assitance as to how this should appear in my query?


.
 
Back
Top