X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 07776D1BB2B for ; Mon, 23 Feb 2004 08:17:32 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 83514-09 for ; Mon, 23 Feb 2004 04:17:29 -0400 (AST) Received: from ind-iport-1.cisco.com (ind-iport-1-sec.cisco.com [64.104.129.9]) by svr1.postgresql.org (Postfix) with ESMTP id EFB94D1BA13 for ; Mon, 23 Feb 2004 04:17:26 -0400 (AST) Received: from india-core-1.cisco.com (64.104.129.221) by ind-iport-1.cisco.com with ESMTP; 23 Feb 2004 19:22:08 +0530 Received: from cisco.com (charminar.cisco.com [192.135.240.11]) by india-core-1.cisco.com (8.12.10/8.12.6) with ESMTP id i1N8HFWT018736; Mon, 23 Feb 2004 00:17:15 -0800 (PST) Received: from sbiswasw2k01 (dhcp-10-77-21-42.cisco.com [10.77.21.42]) by cisco.com (8.8.8-Cisco List Logging/8.8.8) with ESMTP id NAA20063; Mon, 23 Feb 2004 13:45:27 +0530 (IST) From: "Sumita Biswas" To: "'Tom Lane'" Cc: Subject: DATEADD Date: Mon, 23 Feb 2004 13:47:22 +0530 Message-ID: <002d01c3f9e5$76765780$2a154d0a@apac.cisco.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.4024 In-reply-to: <20409.1077506948@sss.pgh.pa.us> X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4927.1200 Importance: Normal X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200402/383 X-Sequence-Number: 17073 I had the following code in my MSSQL Stored Procedure: --Adding 23Hrs 59Mins 59Secs to the ToDate(@ld_ToDate is DateTime datatype) SET @ld_ToDate = DATEADD(ss, 86399, @ld_ToDate); I have changed it to the following for Postgres Function: --Adding 23Hrs 59Mins 59Secs to the ToDate --Here $2 is an input variable(timestamp datatype) lv_ToDate := $2 + interval ''86399 seconds''; Does this make sense? Any pointers appreciated. Thanks, Sumita