On Tue, Jun 11, 2002 at 12:37:09PM +0400, Fduch the Pravking wrote:
> And 'DD' is defined as in range 1..31...
> What if I try to select '100 days'?
>
> fduch=> SELECT to_char('100days'::interval, 'YYYY-MM-DD HH24:MI:SS');
> to_char
> ---------------------
> 0000-00-10 00:00:00
I already said it. The to_char() is 'tm' struct interpreter and use
standard internal PG routines for interval to 'tm' conversion. We can
talk about why 100days is converted to '10' days and months aren't
used. I agree this example seems strange. Thomas?
Karel
--
Karel Zak <[EMAIL PROTECTED]>
http://home.zf.jcu.cz/~zakkr/
C, PostgreSQL, PHP, WWW, http://docs.linux.cz, http://mape.jcu.cz
---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?
http://www.postgresql.org/users-lounge/docs/faq.html