Page 1 of 1

How to break month/year date range into weeks in display

Posted: Fri Nov 17, 2006 12:35 pm
by amir
Whats the best way to do this: I have to run a report which takes a date range. My date range is structured as dropdowns , so FromMonth/FromYear - ToMonth/ToYear - these are basically 4 dropdowns. In the report its supposed to break down weekly. So if i selected between August/2006 - September/2006. Then there would be 10 columns with August-week1, August-week1, August-week1, August-week1, August-week1, September-week1, September-week2, .....till 5th week of september. In the rows it would have the quantity of each product. In the database a date has a quantity associated with it.

so lets the say a date is the 9th Aug. then it would fall on august-week2

How do i go about acheiveing all this??

Thanks!

Posted: Fri Nov 17, 2006 1:37 pm
by feyd
The date() function can return the week number of a given time.