select birthday query

Discussion in 'Databases' started by dizyn, Oct 27, 2008.

  1. #1
    Hi

    I am making a birthday database. I have saved date of birth as '12-12-1985' Now i want to select all the birthday that are in December, Need help in query if possible.

    Regards,
    dizyn
     
    dizyn, Oct 27, 2008 IP
  2. Doron

    Doron Banned

    Messages:
    26
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    try:
    Select * From Table
    Where Month(Convert(datetime, birth_col)) = 12
     
    Doron, Nov 2, 2008 IP
  3. trentmorris

    trentmorris Peon

    Messages:
    3
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Doron, you are a God, I have had this same problem for few days and now have it fixed. Thank you sir!
     
    trentmorris, Nov 2, 2008 IP