Find a MOnth

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

hello i have a table which contains dates in the format 01/01/2007 these go
back over a few years, i want to query the table and get all the records with
february i them! i have formatted the dates to mmmm which give me january
february march and so forth but when i put the criteria in i.e. like feb i
get no results

any ideas!

thanks in advance
 
The month() function should do what you want.

SELECT * FROM yourtable WHERE month(yourDateField) = 2

But on another note when you formatted as "mmmm", "feb" does not equal
"February" which is why you got no results. If you wanted to match
"feb" to "Februrary" you would have to use Like "feb*"

Cheers,
Jason Lepack
 
Back
Top