Really simple query about MySql dates

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
Flashart80
Forum Newbie
Posts: 4
Joined: Fri Jan 02, 2009 8:23 am

Really simple query about MySql dates

Post by Flashart80 »

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
nyoka
Forum Commoner
Posts: 45
Joined: Thu Apr 09, 2009 12:53 pm

Re: Really simple query about MySql dates

Post by nyoka »

Can you give me an example of the data that you are pulling from the database?
Post Reply