Re: fomatting an interval (resend)

From: Dennis Gearon <gearond(at)cvc(dot)net>
To: jks(at)selectacast(dot)net
Cc: Steve Crawford <scrawford(at)pinpointresearch(dot)com>, PostgreSQL General <pgsql-general(at)postgresql(dot)org>
Subject: Re: fomatting an interval (resend)
Date: 2003-05-13 22:06:04
Message-ID: 3EC16C4C.4090005@cvc.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

write a pl/pgsql function that outputs the format, based on receiving the interval in seconds.

jks(at)selectacast(dot)net wrote:
> On Tue, 13 May 2003, Steve Crawford wrote:
>
>
>>How about:
>>
>>select to_char(finish-start, 'HH24:MI:SS') from timetable;
>> to_char
>>----------
>> 00:01:29
>>
>>This won't work if the interval is > 24 hours - you would have to add
>>formatting to allow for days.
>>
>
>
> ... which is exactly my problem.
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo(at)postgresql(dot)org so that your
> message can get through to the mailing list cleanly
>

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Dennis Gearon 2003-05-13 22:12:18 Re: VARCHAR to TIME
Previous Message Jay O'Connor 2003-05-13 21:58:34 executables when upgrading

Browse pgsql-hackers by date

  From Date Subject
Next Message alex avriette 2003-05-13 22:22:50 Re: patch src/bin/psql/help.c
Previous Message Jim C. Nasby 2003-05-13 21:55:41 Re: How are null's stored? -- Some numbers