Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id AD02C475A1E for ; Tue, 12 Nov 2002 10:40:16 -0500 (EST) Received: from webmail9.rediffmail.com (unknown [202.54.124.178]) by postgresql.org (Postfix) with SMTP id 2940F475461 for ; Tue, 12 Nov 2002 10:40:15 -0500 (EST) Received: (qmail 29604 invoked by uid 510); 12 Nov 2002 15:40:07 -0000 Date: 12 Nov 2002 15:40:07 -0000 Message-ID: <20021112154007.29603.qmail@webmail9.rediffmail.com> Received: from unknown (208.220.250.70) by rediffmail.com via HTTP; 12 nov 2002 15:40:07 -0000 MIME-Version: 1.0 From: "praveen vejandla" Reply-To: "praveen vejandla" To: pgsql-sql@postgresql.org Subject: averaging interval values Content-type: text/plain; format=flowed Content-Disposition: inline X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200211/185 X-Sequence-Number: 10327 Hi All, I have a table with one varchar field that contains time intervals. Is there any way to average or sum those intervals in a table ? Table name : test field name : t2 (varchar(40)) it contains all intervals as below t2 1:01:01 0:25:15 7:09:01 8:09:05 Is there any way to average or sum those above values using a function? i could not type cast the varchar(40) to interval type. How to change the datatype of field from varchar to interval? Thanks and Regards, Praveen