Re: epoch to timestamp - Mailing list pgsql-sql

From Josh Berkus
Subject Re: epoch to timestamp
Date
Msg-id 200305120900.11409.josh@agliodbs.com
Whole thread Raw
In response to Re: epoch to timestamp  (Larry Rosenman <ler@lerctr.org>)
Responses Re: epoch to timestamp
List pgsql-sql
Larry,

> I actually have just seconds (from my LD carrier), and want to store it in
> hours/minutes/seconds.

If you store it as an interval, you will end up with:

staffos=# select '12742329 seconds'::INTERVAL;    interval
-------------------147 days 11:32:09

In fact, you can't avoid interval conversion to days, hours, minutes.

--
Josh Berkus
Aglio Database Solutions
San Francisco



pgsql-sql by date:

Previous
From: Larry Rosenman
Date:
Subject: Re: epoch to timestamp
Next
From: Larry Rosenman
Date:
Subject: Re: epoch to timestamp