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

current vs last year's sales

Status
Not open for further replies.

humvie

Technical User
Aug 14, 2002
61
CA
Any one know of any threads that explains how to establish current year (assuming from computer settings ???) and then establish the year prior, then continue on with the rest on my query to finally arrive at comparing this year from last year?

Much appreciated. (I already tried searching "current, last year, "sales", etc. ... but nothing close to what I need.
 
Year(SomeDateGuy) returns the year portion of a date.

Year( DATE() ) = 2003

DateSerial(Year(DATE()-1) returns the previous year, no matter when DATE() is

Check out the Year, DateSerial, DateAdd, and DateDIFF functions. They'll do what you want.

Jim


Me? Ambivalent? Well, yes and no....
Another free Access forum:
More Access stuff at
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top