Home All Groups Group Topic Archive Search About

Display data by Weekly in a specified period

Author
3 Nov 2005 10:31 PM
shil
I am have a table like this

Date      Clicks    Impressions
--------------------------------------------
10/1/2005  10              100
10/2/2005   20              100
    .
    .
    .
10/30/2005  100           1000

I want to display a report by weekly based upon the dates user selects.
User can select which week ending and how many weeks.
For example if user selects Monday as weekending and 3 weeks as how
many, then I want to show the report three weeks back from todays date,
which ends on Monday.

Here is how I needed to show

Week            Clicks                  Impressions
-----------------------------------------------------------------
10/17/2005        100                      1000
10/24/2005        200                      2000
10/31/2005        300                      3000
-----------------------------------------------------------------

Weekending 10/17 means I needed to calcluate data from previous Tuesday
to that Monday.
10/11 to 10/17, the same way weekending 10/24 means it is from 10/18 -
10/24.

Any one knows how to do this?

AddThis Social Bookmark Button