REtrieving Records Based On 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
 
V

Van T. Dinh

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)
 
Top