Re: how do i add a number of days to now()? - Mailing list pgsql-novice

From Michael Glaesemann
Subject Re: how do i add a number of days to now()?
Date
Msg-id 2AA723FC-3B46-415A-BE41-0B829A896FB9@myrealbox.com
Whole thread Raw
In response to how do i add a number of days to now()?  (stig erikson <stigerikson_nospam_@yahoo.se>)
List pgsql-novice
On Dec 18, 2005, at 20:44 , stig erikson wrote:

> my problem is, how do i make postgresql understand that i want to
> add 2 days to the current time?

test=# select current_timestamp as "now"
    , current_timestamp + 2 * interval '1 day' as "2 days from now";
               now              |        2 days from now
-------------------------------+-------------------------------
2005-12-21 14:31:58.338283+09 | 2005-12-23 14:31:58.338283+09
(1 row)

Michael Glaesemann
grzm myrealbox com




pgsql-novice by date:

Previous
From: webbj2@Scranton.edu
Date:
Subject: Find list of table names for particular DB
Next
From: "A. Kretschmer"
Date:
Subject: Re: Static Variables in PL/PGSQL