Re: Help with syntax for timestamp addition - Mailing list pgsql-general

From Ian Barwick
Subject Re: Help with syntax for timestamp addition
Date
Msg-id 1d581afe041122070291e623@mail.gmail.com
Whole thread Raw
In response to Re: Help with syntax for timestamp addition  ("Patrick Fiche" <patrick.fiche@aqsacom.com>)
Responses Re: Help with syntax for timestamp addition
List pgsql-general
On Mon, 22 Nov 2004 15:12:26 +0100, Patrick Fiche
<patrick.fiche@aqsacom.com> wrote:
> Have a try at this syntax
>
> SELECT number
> FROM procedures
> WHERE date + CAST( numdays || ' days' AS interval ) <=  CURRENT_TIMESTAMP;

Just for the record you could write it like this too:
 SELECT number
 FROM procedures
 WHERE date + (numdays || ' days')::interval  <= CURRENT_TIMESTAMP;

Ian Barwick

pgsql-general by date:

Previous
From: Scott Nixon
Date:
Subject: Re: Help with syntax for timestamp addition
Next
From: Peter Eisentraut
Date:
Subject: Re: Help with syntax for timestamp addition