Hello all out there. Thanks to everyone for all the help you gave me solving this problem. It was much easier than I thought. The SQL statement I used was rudy's suggestion: SELECT convert(char(10),timestamp,101) AS day ,avg(value) AS new_val FROM mytable WHERE timestamp BETWEEN from_date and to_date GROUP BY convert(char(10), timestamp,101). Thanks again. You all were a huge help. Marios _________________________________________________________________________ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.