Really simple query about MySql dates
Posted: Tue Apr 07, 2009 1:32 pm
Hi everyone
Got a really simple question!
I have a range of dates I am querying in MySql, for example 2009-01-01 to 2009-04-01. However I want MySql to return the results in weeks rather than lumping the totals together.
So it would read 2009-01-05 to 2009-01-11 then 2009-01-05 to 2009-01-12 and so on.
Can anyone help? I have searched for this but couldn't find anything that I could immediately apply..
Many thanks!
Regards
Peter
Got a really simple question!
I have a range of dates I am querying in MySql, for example 2009-01-01 to 2009-04-01. However I want MySql to return the results in weeks rather than lumping the totals together.
So it would read 2009-01-05 to 2009-01-11 then 2009-01-05 to 2009-01-12 and so on.
Can anyone help? I have searched for this but couldn't find anything that I could immediately apply..
Many thanks!
Regards
Peter