Re: missing something obvious about intervals?

From: Volkan YAZICI <yazicivo(at)ttnet(dot)net(dot)tr>
To: David Rysdam <drysdam(at)ll(dot)mit(dot)edu>
Cc: "pg >> Postgres General" <pgsql-general(at)postgresql(dot)org>
Subject: Re: missing something obvious about intervals?
Date: 2005-12-12 18:09:14
Message-ID: 20051212180914.GB556@alamut
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

On Dec 12 01:00, David Rysdam wrote:
> I have a table that has a date field and a "real" field that represents
> a number of seconds. I want select the date field + the seconds field.
> Just adding it doesn't work. Casting to interval doesn't work.
> to_date/to_timestamp don't work. How do I do this?

In the "9.9. Date/Time Functions and Operators" chapter of PostgreSQL
Documentation, here's the first example of the first page:

Operator: +
Example : date '2001-09-28' + integer '7'
Result : date '2001-10-05'

--
"We are the middle children of history, raised by television to believe
that someday we'll be millionaires and movie stars and rock stars, but
we won't. And we're just learning this fact," Tyler said. "So don't
fuck with us."

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Volkan YAZICI 2005-12-12 18:24:09 Re: missing something obvious about intervals?
Previous Message vishal saberwal 2005-12-12 18:08:12 ERROR: could not find function

Browse pgsql-hackers by date

  From Date Subject
Next Message Stephan Szabo 2005-12-12 18:18:46 Re: Foreign key trigger timing bug?
Previous Message David Rysdam 2005-12-12 18:07:04 Re: missing something obvious about intervals?