1

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

Sample record:

01.08.2001
06.06.1985
26.08.1995

etc..

How should I do write a query?

Regards,

1
  • 2
    It is always best to mention what platform you are working in, as different platforms will have different solutions.
    – mrdenny
    Aug 4, 2011 at 19:36

1 Answer 1

3

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
2
  • Concise + straightforward = +1 !!! Aug 4, 2011 at 18:34
  • Thanks Rolando :-). Means a lot coming from a DBA with your experience.
    – Marian
    Aug 4, 2011 at 18:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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