DateAdd

B

bobc721

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)
 
B

bobc721

thanks fredg....

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