Search Postgresql Archives

Re: Int to Interval conversion

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sep 14, 2010, at 7:57 , Howard Cole wrote:

> create table test (test_id serial primary key, time_in_minutes int);
> insert into test values (1440);
> 
> Now how do I extract that as 24:00:00::interval in a query?

test=# SELECT 1440 * INTERVAL '1 minute';
 ?column? 
----------
 24:00:00
(1 row)

Michael Glaesemann
grzm seespotcode net




-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux