Record query by date

  • Thread starter Thread starter James Mckillop
  • Start date Start date
J

James Mckillop

I am trying make a query to return all records for the
last year, month, day.... etc... I have the field set as
a date now how do I get the query set up?

Thanks

James
 
You need to fill in your criteria field. Have a lot in help, there's a whole
load of different expressions used to split up a date.
 
I am not exactly sure what you mean by "last year, month,
day, ect". but to select a date range - in your criteria
pane enter: >=#1/1/03# and < #1/1/04#
the above criteria would select all records with a 2003
date..
 
I am more interested in coding using some variant of Now
(). That way I can set it to something like Now() -30 or
whatever it is suposed to do to show the records for the
last 30 days. Any other suggestions?

James
 
I figured out how to do it. I used > Date()-30 for the
last month and then > Date()-365 for the last year.

Hope this helps someone else.

James
 
Frank Stone said:
I am not exactly sure what you mean by "last year, month,
day, ect". but to select a date range - in your criteria
pane enter: >=#1/1/03# and < #1/1/04#
the above criteria would select all records with a 2003
date..
 
Back
Top