Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Query Last Twelve Months, but not this Month

Status
Not open for further replies.

perrymans

IS-IT--Management
Nov 27, 2001
1,340
US
It is February 2008 now, I want to return January 2007 thru Januray 2008.

I tried:

Code:
>DateAdd("yyyy",-1,Now())

But it let's in the dates for this month.

Thanks. Sean.
 
What about this ?
Between DateSerial(Year(Now())-1,Month(Now())-1,1) And DateSerial(Year(Now()),Month(Now()),0)

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top