Received: from davinci.ethosmedia.com (davinci.ethosmedia.com [209.10.40.250]) by mail.postgresql.org (8.11.1/8.11.1) with ESMTP id f26HN0x41434 for ; Tue, 6 Mar 2001 12:23:00 -0500 (EST) (envelope-from josh@agliodbs.com) Received: from [207.172.28.154] (HELO agliodbs.com) by davinci.ethosmedia.com (CommuniGate Pro SMTP 3.4.1) with ESMTP id 21082 for pgsql-sql@postgresql.org; Tue, 06 Mar 2001 09:22:59 -0800 Message-ID: <3AA51CD1.8A55F64F@agliodbs.com> Date: Tue, 06 Mar 2001 09:22:25 -0800 From: Josh Berkus Reply-To: josh@agliodbs.com Organization: Aglio Database Solutions X-Mailer: Mozilla 4.73 [en] (Win98; I) X-Accept-Language: en MIME-Version: 1.0 To: sqllist Subject: Re: No Documentation for to_char(INTERVAL, mask) References: <3AA469E9.DCFFC0AE@agliodbs.com> <20010306091316.B6115@ara.zf.jcu.cz> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Archive-Number: 200103/108 X-Sequence-Number: 1759 Karel, > The 'interval' version of to_char() isn't implemented -- may be in 7.2 > (it's high in my TODO list:-) Grazie. (One of the things I love about PostgreSQL is being able to get definitive answers on functionality -- try asking Microsoft an "is this implemented?" question!) Given the lack of to_char(interval), I'd like to write a PLPGSQL function to fill the gap in the meantime. If you can answer a few questions about how interval values work, it would be immensely helpful: 1. Hours, minutes, and seconds are displayed as "00:00:00". Days are displayed as "0 00:00:00". How are weeks, months, and years displayed? 2. If months have their own placeholder in the Interval data type, how many days make up a month? Is it a fixed value, or does it depend on the calendar? Thanks. I'll post the PLPGSQL function to the list after I write it. -Josh Berkus -- ______AGLIO DATABASE SOLUTIONS___________________________ Josh Berkus Complete information technology josh@agliodbs.com and data management solutions (415) 565-7293 for law firms, small businesses fax 621-2533 and non-profit organizations. San Francisco