1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

Compare this month's sales to this month last year

Discussion in 'Software Development' started by annsolomon, Jun 1, 2003.

Thread Status:
Not open for further replies.
  1. annsolomon

    annsolomon Thread Starter

    Joined:
    May 26, 2003
    Messages:
    22
    I'm trying to create an Access query that compares 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?
     
  2. annsolomon

    annsolomon Thread Starter

    Joined:
    May 26, 2003
    Messages:
    22
    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
     
As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Loading...
Similar Threads - Compare month's sales
  1. tradesource
    Replies:
    0
    Views:
    202
Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/136979

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice