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

Compare this month's sales to this month last year

Status
Not open for further replies.
Oct 24, 2002
512
US
I'm trying to compare invoices generated in May of 2002 to invoices generated in May of 2003 so we can see how much money we made compared to last year at this time.

I've tried datediff, dateserial, dateadd but can't seem to get it right. Can some kind soul give me a hand here?

Ann
 
I figured it out. Had to use "between". I was trying to just hone in on a particular month last year but I guess that was the lazy way out. Anyway, here's what I ended up with to compare May 02 to May 03:

Between DateSerial(Year(Date())-1,Month(Date())-1,1) And DateSerial(Year(Date())-1,Month(Date()),1)-1

Ann
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top