Capturing data between dates

dogdog

New Member
Joined
Jul 15, 2002
Messages
12
Maybe this criteria is to simple to find in this forum, but I need help with it, maybe others do too. I am querying a database and need to capture data between 7/1/2004 and 1/31/2009. Can anone point me in the right direction? I can't seem to find this simple request in the other responses, sorry! M
 

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.
In your criteria for the field that contains the date, use the Between Function. Between #7/1/2004# and #1/31/2009#

Alan
 
Upvote 0
Thanks Alan, perhaps I wrote the question too quickly. I have one column with Fiscal Years by year: 2004, 2005, 2006, 2007.... and another column with Months: JFMAMJJASOND. I wanted to get all fiscal years through January 2009, but not February 2009.

So ... I'm working with two columns. Do I need to concatenate the two together, or can I run a query criteria to limit the query to just what I'm looking for. I just don't seem to be able to figure any easy solution to this. Thanks so much for your help. M
 
Upvote 0
Do you have the actual dates anywhere, rather than month and year in separate fields? If not, you should create a calculated field in the query -- something like
TestDate:DATESERIAL([YearField],CHOOSE([MonthField],"Jan","Feb","Mar","Apr","May"..."Dec"),1)
Adjust names to suit and complete the CHOOSE section, using whatever month format you have entered.
Then you can use Alan's suggestion in the criteria for this new field.

Denis
 
Upvote 0

Forum statistics

Threads
1,215,064
Messages
6,122,941
Members
449,094
Latest member
teemeren

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top