I have a database full of kind of sales numbers. I want to be
able to search for all the say, Fridays, or Tuesdays to see the
numbers on those days specifically. I know how to do date ranges,
but not specific days so it could pull up the last 27 Fridays that
data was inputed on.
It largely depends on the database and the date functions
available to it. Of course, you could always use cf to generate a
list of the last 27 Fridays and use that list in your query.
A quick google search turned up the mySQL date_format ()
function:
WHERE date_format(myDateField, '%W') = 'Friday'
I'm not that familiar with mySQL databases myself, so you
might have to play around with the syntax above, but it seems like
it should fill your requirements.