date query

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I want to compare two dates so that the query only returns records for dates
that do not apear in the same month. eg 1/3/06 compared with 15/3/06 would
not be returned but eg 12/3/06 compared with 21/4/06 would be returned. What
is the required criteria to achieve this?

Thanks in advance
 
Something like this:

WHERE (Field1 Is Null) OR (Field2 Is Null) OR NOT
(Month(Field1) = Month(Field2) AND Year(Field1) = Year(Field2))
 

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

Back
Top