pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Sumita Biswas <sbiswas@cisco.com>
To: 'Tom Lane' <tgl@sss.pgh.pa.us>
Cc: pgsql-sql@postgresql.org
Subject: DATEADD
Date: Mon, 23 Feb 2004 13:47:22 +0530
Message-ID: <002d01c3f9e5$76765780$2a154d0a@apac.cisco.com> (raw)
In-Reply-To: <20409.1077506948@sss.pgh.pa.us>


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




view thread (8+ messages)

Message-ID: <002d01c3f9e5$76765780$2a154d0a@apac.cisco.com>
Permalink:  ../002d01c3f9e5$76765780$2a154d0a@apac.cisco.com/
Also on:    postgresql.org/message-id/002d01c3f9e5$76765780$2a154d0a@apac.cisco.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: sbiswas@cisco.com, tgl@sss.pgh.pa.us
  Subject: Re: DATEADD
  In-Reply-To: <002d01c3f9e5$76765780$2a154d0a@apac.cisco.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox