Re: epoch to timestamp

From: Josh Berkus <josh(at)agliodbs(dot)com>
To: Larry Rosenman <ler(at)lerctr(dot)org>, Achilleus Mantzios <achill(at)matrix(dot)gatewaynet(dot)com>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: epoch to timestamp
Date: 2003-05-12 16:00:11
Message-ID: 200305120900.11409.josh@agliodbs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general 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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Doug McNaught 2003-05-12 16:01:44 Re: Caching Websites
Previous Message Steve Crawford 2003-05-12 15:56:02 Re: realtime data inserts

Browse pgsql-sql by date

  From Date Subject
Next Message Larry Rosenman 2003-05-12 16:02:13 Re: epoch to timestamp
Previous Message Larry Rosenman 2003-05-12 15:35:00 Re: epoch to timestamp