REtrieving Records Based On Date

  • Thread starter Thread starter Fakhruddin Zavery
  • Start date Start date
F

Fakhruddin Zavery

Hello,

I have a field which is a date field and the data is stored as Short Date. I
want to write a query that should retrieve records based on a particular
month that I supply as a parameter, how can i do this in Access or is there
a specific function that can just pick a MM portion of the date field?

Thanks and Regards
Fakhruddin
 
Look up the details on the Month() function - it should do what you want.
 
Do you want a particular month of a particular year or any year?

If you want a particular month of a particular year, then you can set up a
Query with SQL something like:

SELECT [YourTable].*
FROM [YourTable]
WHERE [YourTable[.DateField
BETWEEN DateSerial([Enter Year:], [Enter Month (1-12):], 1)
AND DateSerial([Enter Year:], [Enter Month (1-12):] + 1, 0)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top