---------- Forwarded message ----------
Date: Sat, 23 Sep 2000 15:58:06 +0200 (CEST)
From: Alessandro Rossi <alex@sunrise.radiostudiodelta.it>
To: pgsql-sql@postgresql.org
Subject: timestamp difference in hours?
I found in a post from Jeff MacDonald the following example:
bignose=> \d foo Table "foo"Attribute | Type | Modifier
-----------+-----------+----------start | timestamp | stop | timestamp |
bignose=> select start,stop, stop-start as start_stop from foo; start | stop |
start_stop
------------------------+------------------------+------------2000-06-22 20:37:12-03 | 2000-06-22 20:37:12-03 |
00:0002000-06-2220:40:40-03 | 2000-06-23 20:40:40-03 | 1 00:002000-06-22 20:40:53-03 | 2000-09-30 20:40:53-03 | 100
00:002000-06-2220:41:08-03 | 2000-06-23 02:41:08-03 | 06:002000-06-22 20:41:30-03 | 2010-11-22 19:41:30-04 | 3805
00:00
(5 rows)
Is it possible to get the start_stop field in hours ?
And not in days, hours ?
ex: 1 00:00 -> 24:00
In postgres what is the difference between
the type datetime and timestamp?
Thanks in advance
Alex