"Jeff Eckermann" <[EMAIL PROTECTED]> writes:
> There is no "dateadd" function in PostgreSQL, but you can write your own
> easily enough. The following should give you an idea of the logic you can
> use:
> jeck=# select current_date + cast('1 day' as interval);
Alternatively, maybe you want to
"Zlatko MatiƦ" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
>I am currently migrating from MSDE to PostgreSQL and have to rewrite the
>function that is calculating next date of sampling...
> In MSDE there is a DateAdd function. I can't find the appropriate function
> in postgre.
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 t
"Josh Berkus" <[EMAIL PROTECTED]> writes:
> Speaking of which, why doesn't PostgreSQL allow the use of "+" between
> two VARCHARs to mean the same as "||" ?
You mean, other than the fact that "||" is the SQL-standard string
concatenation operator and "+" isn't?
I'm not eager to follow the pied p
Folks,
FYI - this difference in syntax is because PostgreSQL implements real
SQL operators (i.e. what the operator does and what arguments it takes
depend on the data types involved) and Microsoft does not (in MS SQL,
operators mean the same thing for almost all data types).
Spea
* Ligia Pimentel <[EMAIL PROTECTED]> menulis:
> I need to know if there is a sql function implemented in postgres that gives
> me a date plus any number of days, months or years (the traditional dateadd
> function) or how to do it in sql?
cepat=# select '01-01-00'::date + '2 months 10 days'::inte
On Wed, 2 May 2001, Ligia Pimentel wrote:
> I need to know if there is a sql function implemented in postgres that gives
> me a date plus any number of days, months or years (the traditional dateadd
> function) or how to do it in sql?
Just add a date and an interval. Something like:
date + '1
I need to know if there is a sql function implemented in postgres that gives
me a date plus any number of days, months or years (the traditional dateadd
function) or how to do it in sql?
Thanks in advance for any help
Ligia
---(end of broadcast)