In an access Query how do you get data for the current month

  • Thread starter Thread starter Dram
  • Start date Start date
D

Dram

I would like to extract data for the current month only from my data base
based on a receipt date. formated as mm/dd/yyyy I can get todays stuff and
last months stuff but simply can't get the current month.
 
Open your query in design view, scroll to the right to find a blank column
and enter this in the Field row of the grid -- Last_Month: Format([receipt
date], "yyyymm")
Below in the Criteria row enter -- Format(DateAdd("m",-1,Date()),"yyyymm")
 
As written this returned the previous months data, but it gave me a starting
point. by changing the -1 to a 0 it returned the curent months data. So thank
you very much it was exactly what I needed and is very much appreciated.

KARL DEWEY said:
Open your query in design view, scroll to the right to find a blank column
and enter this in the Field row of the grid -- Last_Month: Format([receipt
date], "yyyymm")
Below in the Criteria row enter -- Format(DateAdd("m",-1,Date()),"yyyymm")

--
KARL DEWEY
Build a little - Test a little


Dram said:
I would like to extract data for the current month only from my data base
based on a receipt date. formated as mm/dd/yyyy I can get todays stuff and
last months stuff but simply can't get the current month.
 
Back
Top