Re: Timestamp/Interval proposals: Part 2

From: Karel Zak <zakkr(at)zf(dot)jcu(dot)cz>
To: Hannu Krosing <hannu(at)tm(dot)ee>
Cc: Thomas Lockhart <lockhart(at)fourpalms(dot)org>, josh(at)agliodbs(dot)com, hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Timestamp/Interval proposals: Part 2
Date: 2002-06-10 08:49:30
Message-ID: 20020610104930.A1341@zf.jcu.cz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


> > 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 ?

to_char() convert interval to 'tm' and make output like this struct,
I don't know what other is possible do with it.

> Or is it some ISO standard ?
>
> Ditto for 15h -> 03 .

HH vs. HH24

test=# select to_char('33s 15h 10m 5months'::interval, 'HH24:MI:SS Month');
to_char
--------------------
15:10:33 May

Karel

--
Karel Zak <zakkr(at)zf(dot)jcu(dot)cz>
http://home.zf.jcu.cz/~zakkr/

C, PostgreSQL, PHP, WWW, http://docs.linux.cz, http://mape.jcu.cz

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Hannu Krosing 2002-06-10 09:13:29 Re: Timestamp/Interval proposals: Part 2
Previous Message Karel Zak 2002-06-10 07:58:59 Re: Timestamp/Interval proposals: Part 2