Sign up ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

I want to find the records of August birthdays in own table.I'm using Datetime Field.

Sample record:



How should I do write a query?


share|improve this question
It is always best to mention what platform you are working in, as different platforms will have different solutions. – mrdenny Aug 4 '11 at 19:36

1 Answer 1

up vote 3 down vote accepted

What's the db server you're working with? In SQL Server there's the MONTH function.

Your query could be something like:

Select *
from User u
where month(u.DOB) = 8
share|improve this answer
Concise + straightforward = +1 !!! – RolandoMySQLDBA Aug 4 '11 at 18:34
Thanks Rolando :-). Means a lot coming from a DBA with your experience. – Marian Aug 4 '11 at 18:41

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.