Hopefully this is an elementary question that I just can't seem to get my head around. I'm far from being a master in queries. Can I query for records using the name of the day of the week in my date field? In other words find all the records that have a Saturday as the date when my date field is saving the date in this format (2004-07-10)? Didn't know how I could use dayname() in my query to get the results, if at all. I don't want to display the day name ("Saturday"), I would like to use it in my query. Kind of like this, which I know is not valid
SELECT var1, var2, date FROM table a WHERE dayname(date)=Saturday
Any help is appreciated
WHERE DAYOFWEEK(datecolumn) = 7
worked like a champ. I knew I was asking a dumb question. Don't know why I didn't think of doing it that way, but thanks for making me feel like an idiot. Sometimes, you just need to be reminded!
oh come on, you weren't an idiot, you were on the right track
this would work too --
WHERE DAYNAME(datecolumn) = 'Saturday'
it's just more typing :)