Shubham Dwivedi
Shubham Dwivedi

Reputation: 53

How to do a month search by sql query

I have 1 table in MS Access which is like:

id   date
1    1/01/2016
2    1/01/2016
3    1/01/2016

How do I perform a search operation on it by month - meaning a search where the month is January/February?

Upvotes: 0

Views: 162

Answers (1)

AsheraH
AsheraH

Reputation: 472

Using dates as criteria in Access queries: Contain a date within a specific month (regardless of year), such as December

DatePart("m", [SalesDate]) = 12

Returns items with a date in December of any year. Where of course you replace [SalesDate] with your column...

Upvotes: 2

Related Questions