DateAdd

G

Guest

I have been though most of the thread associated with query append and
dateadd to see if I can locate a criteria that will suit my needs. I am
working on pulling timesheets by querying the timesheets via a linked table.
I want to be able to select everything in the table for the previous month..
ie.. for September I want to see all the hours that were charged by the
employee from 9/1/2006 to 9/30/2006. When I used the >=DateAdd("m",-1,Date())
it goes back 30 days... and I get 9/11/2006 through 10/10/2006. Any idears?
 
F

fredg

I have been though most of the thread associated with query append and
dateadd to see if I can locate a criteria that will suit my needs. I am
working on pulling timesheets by querying the timesheets via a linked table.
I want to be able to select everything in the table for the previous month..
ie.. for September I want to see all the hours that were charged by the
employee from 9/1/2006 to 9/30/2006. When I used the >=DateAdd("m",-1,Date())
it goes back 30 days... and I get 9/11/2006 through 10/10/2006. Any idears?

Between DateSerial(Year(Date()),Month(Date())-1,1) and
DateSerial(Year(Date()),Month(Date()),0)
 
G

Guest

thanks fredg....

that was the trick I needed. Looks like I need a thicker reference manual ;o)
 

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