On 9/11/06, Tom Lane <[EMAIL PROTECTED]> wrote:
"Aaron Bono" <[EMAIL PROTECTED]> writes:> Use:> select start_date + (cast(number_of_days as text) || ' days')::interval from> blah
This is a pretty awful way to do it, much better isselect start_date + number_of_days * '1 day'::interval ...whi
"Aaron Bono" <[EMAIL PROTECTED]> writes:
> Use:
> select start_date + (cast(number_of_days as text) || ' days')::interval from
> blah
This is a pretty awful way to do it, much better is
select start_date + number_of_days * '1 day'::interval ...
which reduces to basically one multiplicat
On Mon, 2006-09-11 at 16:53 +1200, Mike C wrote:
> create table blah (start_date timestamp, number_of_days integer);
> insert into blah values (current_timestamp, 25);
> select start_date + number_of_days from blah;
>
> The error I get is:
>
> ERROR: operator does not exist: timestamp without
That works great, thank you!MikeOn 9/11/06, Aaron Bono <[EMAIL PROTECTED]> wrote:
On 9/10/06, Mike C <[EMAIL PROTECTED]
> wrote:
Hi,I'm trying to calculate an expiration date by adding the number of days onto the start date. i.e. select start_date + number_of_days from blah; create table blah (sta
On 9/10/06, Mike C <[EMAIL PROTECTED]> wrote:
Hi,I'm trying to calculate an expiration date by adding the number of days onto the start date. i.e. select start_date + number_of_days from blah; create table blah (start_date timestamp, number_of_days integer);
insert into blah values (current_timesta