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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Date Range of Last Year Last Full Month 1

Status
Not open for further replies.

crystaledout

Technical User
Jul 6, 2008
3
US
Hi, I essentially need to put into my select criteria that I want all records that were opened during the previous month of last year, e.g., today is September 1, 2010; I would like all records opened during the month of August 2009.

Thanks for any guidance you can provide!
 


What if you run it during January 2011? Do you want Dec. 2010 or Dec. 2009?

 
Thanks for your help. I would want it to be December 2009.
 

Try these:

Start of range:

dateadd("d",1,dateadd("m",-1,dateadd("yyyy",-1,maximum(lastfullmonth))))

End of range:

dateadd("yyyy",-1,maximum(lastfullmonth))

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top