DATEADD

From: "Sumita Biswas" <sbiswas(at)cisco(dot)com>
To: "'Tom Lane'" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: <pgsql-sql(at)postgresql(dot)org>
Subject: DATEADD
Date: 2004-02-23 08:17:22
Message-ID: 002d01c3f9e5$76765780$2a154d0a@apac.cisco.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql


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

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Sumita Biswas 2004-02-23 08:33:05 EXECUTing QUERY:
Previous Message Sumita Biswas 2004-02-23 06:21:16 Input Arguments