pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
time difference
2+ messages / 2 participants
[nested] [flat]

* time difference
@ 2001-05-25 15:12  Seema Noor <seema_56@yahoo.com>
  0 siblings, 0 replies; 2+ messages in thread

From: Seema Noor @ 2001-05-25 15:12 UTC (permalink / raw)
  To: pgsql-sql; +Cc: pgsql-novice@postgresql.org


i want to calculate the session time. my query is this

select now() - '2001-05-19 12:09:00+5;

it gives the difference in date and difference in time separately. if the
current time is greater than the second time then it gives simply their
difference but i want to calcutate the session time from these two times.
if now() = 2001-05-25 01:00:00+5
and second timestamp = 2001-05-24 23:00:00+5

then how can i get their time differernce EQUAL TO '3:00:00' instead of '21:00:00 ago' ?

and is there a way to get the total time difference including the date factor involved i.e.
if now() = 2001-05-25 23:00:00+5
and second timestamp = 2001-05-24 01:00:00+5
then is there any function to get their difference equal to '46:00:00' instead of '1 22:00:00' ?

please reply me soon.

^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* time difference
@ 2002-06-28 03:58  q u a d r a <quadratini@sni.ph>
  0 siblings, 0 replies; 2+ messages in thread

From: q u a d r a @ 2002-06-28 03:58 UTC (permalink / raw)
  To: pgsql-sql


I have a query that returns
    ?column?    
-----------------
 6 days 01:56:14
(1 row)


How can I get it as total number of hours?
Instead of days and hours, I need hours only (all in all, so 24hours * 6 
days + 01:56:14)
Can you help me please? Thanks






^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2002-06-28 03:58 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2001-05-25 15:12 time difference Seema Noor <seema_56@yahoo.com>
2002-06-28 03:58 time difference q u a d r a <quadratini@sni.ph>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox