Another date / time question

From: "Vanole, Mike" <mike(dot)vanole(at)attws(dot)com>
To: <pgsql-general(at)postgresql(dot)org>
Subject: Another date / time question
Date: 2004-03-23 23:54:18
Message-ID: 468FC37AA22ACC439DE72726281E4B6001DCB986@tx-msg03-aln.wireless.attws.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,

I'm trying to query two timestamp(0) columns to determine elapsed time. I use the age() function which works fine, but I want to return the information in MINUTES.

So...

sel age(endtime, starttime) returns 02:23:00, for example, or 2 days 03:05:03.

How can I get this to return 143 or 3065.nn - by my examples above - without parsing and substringing or extracting? Is there a clean way to "cast" this to minutes?

Thank you,
Mike

Responses

Browse pgsql-general by date

  From Date Subject
Next Message ogjunk-pg 2004-03-24 00:00:22 createused + createdb problems with passwords
Previous Message Bruce Momjian 2004-03-23 23:50:44 Re: linked list rewrite