Query to retrieve specific month

MattAnderson

Registered User.
Local time
Today, 01:15
Joined
Mar 10, 2014
Messages
11
Hey guys I've just joined this amazing site so hello to all. :)

I have a query which I'd like to create which would be to retrieve records from a specific month of a specific year, in this format "01/14" "02/13" etc..

Would anybody be able to tell me the criteria I need to input for this to happen.

Obviously it would need a prompt box for the query for the user to input the month and year.

If anybody could help me that would be amazing,

Thanks.

Matt
 
Hello MattAnderson, Welcome to AWF :)

You can try something like..
Code:
SELECT someFields FROM theTable
WHERE Format(theDateField, "mm/yy") = [enterTheMonthYear];
 
Thank you so much for your help, you really are a life saver.

Regards,

Matt
 
hi All,

I have a smilar problem, I have a query that shows data from January to March (which is the current month). is there a possibility to exclude the current month

The query has the following fields

Date
PCC
AgencyName
SegmentData
 
You can write something like.
Code:
SELECT someFields FROM theTable
WHERE Month(DateField) <> Month(Date);

PS: Next time, please open a new thread if you have a question. This will open up a wider audience base rather than restricting to a few looking into the threads.
 
tried again pr2's suggestion and it worked like a charm, for 2013 access the expression converts to <>Month(Date())

thanks a lot guys.
 

Users who are viewing this thread

Back
Top Bottom