Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 2FBF9475CB1 for ; Fri, 22 Nov 2002 09:26:24 -0500 (EST) Received: from webmail31.rediffmail.com (unknown [202.54.124.130]) by postgresql.org (Postfix) with SMTP id 012CD475B8F for ; Fri, 22 Nov 2002 09:26:22 -0500 (EST) Received: (qmail 11785 invoked by uid 510); 22 Nov 2002 14:26:09 -0000 Date: 22 Nov 2002 14:26:09 -0000 Message-ID: <20021122142609.11784.qmail@webmail31.rediffmail.com> Received: from unknown (208.220.250.70) by rediffmail.com via HTTP; 22 nov 2002 14:26:09 -0000 MIME-Version: 1.0 From: "praveen vejandla" Reply-To: "praveen vejandla" To: pgsql-sql@postgresql.org Subject: calculating interval Content-type: text/plain; format=flowed Content-Disposition: inline X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200211/343 X-Sequence-Number: 10485 Dear All, Is there any way in postgresql to calculate the interval between two times excluding specific days,specific duration. Ex: timestamp1 : 2002-10-01 10:30AM timestamp2 : 2002-15-01 04:50PM suppose if i need the difference between timestamp1,timestamp2 but i don't want to count how many sun days are coming, i want to ignore all sundays in between,i want to ignore certain timings(say 10.00 AM to 5:00PM)s also,then how can I get the duration in this way. Thanks and Regards, Praveen