Results 1 to 3 of 3
  1. #1
    New Lounger
    Join Date
    Jul 2010
    Location
    London
    Posts
    14
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hi All

    I'd like to query a table to retrieve all records where the invoice date was within the last 3 months. So I would like the recordset to change as time progresses. Normally I would do something like

    where invoiceDate = between date()-90 and date()

    However i want all data for each month e.g. all of June, July and August.

    Hope I've worded that so someone gets what I'm trying to do.

    Any help would be much appreciated.

    Many thanks

    Amanda

  2. #2
    5 Star Lounger AndrewKKWalker's Avatar
    Join Date
    Apr 2001
    Location
    Cambridge, UK
    Posts
    1,020
    Thanks
    0
    Thanked 3 Times in 3 Posts
    Between Date() And DateSerial(Year(DateAdd("m",-2,Date())),Month(DateAdd("m",-2,Date())),1)

    Ought to do it.
    Andrew

  3. #3
    New Lounger
    Join Date
    Jul 2010
    Location
    London
    Posts
    14
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks Andrew - that works a treat.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •