code for any date greater than last November

J

JWCrosby

What would the criterion in a query be to select any date later than November
15 of the previous year (the field being a standard date field like
2/3/2009)?
 
J

Jeff Boyce

If the field actually contains "2/3/2009", a text string, rather than an
actual date/time data type value, you have a different issue.

If the field is a date/time datatype field that just happens to be formatted
to display something that looks like "2/3/2009", then take a look at the
following:

DateSerial(Year(Date())-1,11,15)

will generate November 15th of the year preceding the current year. You can
add your "<" or ">" or ... comparisons to return the records you want.

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
J

JWCrosby

That did it! Thanks!

Jeff Boyce said:
If the field actually contains "2/3/2009", a text string, rather than an
actual date/time data type value, you have a different issue.

If the field is a date/time datatype field that just happens to be formatted
to display something that looks like "2/3/2009", then take a look at the
following:

DateSerial(Year(Date())-1,11,15)

will generate November 15th of the year preceding the current year. You can
add your "<" or ">" or ... comparisons to return the records you want.

Regards

Jeff Boyce
Microsoft Office/Access MVP
 

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