DATEADD - Mailing list pgsql-sql

From Sumita Biswas
Subject DATEADD
Date
Msg-id 002d01c3f9e5$76765780$2a154d0a@apac.cisco.com
Whole thread Raw
In response to Re: Postgres DB  (Tom Lane <tgl@sss.pgh.pa.us>)
List 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



pgsql-sql by date:

Previous
From: "Sumita Biswas"
Date:
Subject: Re: Error Number in Function
Next
From: "Sumita Biswas"
Date:
Subject: EXECUTing QUERY: