Date search

C

Chuck216

Hi

I would like to have search criteria in a 2 queries, one that searches the
date field for January thru June of the current year and the other that
searches July thru December of the current year.

Thanks in advance for any help with this.
Chuck
 
B

Beetle

For the first case;

Where Year([YourDateField]) = Year(Date()) AND Month([YourDateField]) < 7

For the second case;

Where Year([YourDateField]) = Year(Date()) AND Month([YourDateField]) > 6

Replace [YourDateField] with the actual name of the field that stores your
date value.
 
J

John W. Vinson

Hi

I would like to have search criteria in a 2 queries, one that searches the
date field for January thru June of the current year and the other that
searches July thru December of the current year.

Thanks in advance for any help with this.
Chuck

As an alternative to Beetle's suggestion (which should work fine):

First half:
= DateSerial(Year(Date()), 1, 1) AND < DateSerial(Year(Date()), 7, 1)

Second half:
 

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

Top