On Mon, 2002-06-10 at 09:58, Karel Zak wrote:
> On Fri, Jun 07, 2002 at 06:48:31PM -0700, Thomas Lockhart wrote:
> >
> > > Proposal #4: Create to_char(INTERVAL, 'format string') Function.
> > > Reason: self-evident, I think.
> >
> > Oh. Didn't know it wasn't already there.
>
> I'm _sure_ that to_char() is there for interval.
>
> testt=# select to_char('33s 15h 10m 5month'::interval, 'HH:MI:SS Month');
> to_char
> --------------------
> 03:10:33 May
> (1 row)
Does "May" make sense for an _interval _ ? (Feb 22 + May = Jul 22)?
Would not "5 months" make more sense ?
Or is it some ISO standard ?
Ditto for 15h -> 03 .
--------------------
Hannu