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?


.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Date query 2
NetworkDays 3
Stored date is not being recognised 1
Crosstab Queries by week 2
Date range question 5
Need help with another code question... 2
Help Please 3
Default value return 4

Back
Top