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 usestandard internal PG routines for interval to 'tm'
conversion.We cantalk about why 100days is converted to '10' days and months aren'tused. I agree this example seems
strange.Thomas?
Karel
-- Karel Zak <zakkr@zf.jcu.cz>http://home.zf.jcu.cz/~zakkr/C, PostgreSQL, PHP, WWW, http://docs.linux.cz,
http://mape.jcu.cz