Re: date/time functions

From: "Len Morgan" <len-morgan(at)crcom(dot)net>
To: <pgsql-general(at)postgresql(dot)org>
Subject: Re: date/time functions
Date: 2000-08-16 12:15:13
Message-ID: 002001c0077b$b1e635c0$0908a8c0@H233.bstx.cc
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


-----Original Message-----
>I'm having trouble with converting a 'seconds' field to
>'hours:min:sec'..
>
>Using reltime, I can get a 'months day hh:mm:ss' representation, which
>is very good, but not what I need.
>
>I need to show 'hours' as the largest component..
>
>eg. it wouldn't be uncommon to deal with '2345:23:12' ie 2345 hours, 23
>min and 12 sec..

You might consider writing your own function using the pgtcl "language" of
Postgres. It's clock scan/clock format commands are just the ticket for
what you're doing.

len morgan

Browse pgsql-general by date

  From Date Subject
Next Message Andrew McMillan 2000-08-16 12:29:20 Re: Interval examples
Previous Message DalTech - CTE 2000-08-16 12:11:14 Re: variables in SQL??