Re: Problem with Day of Week
От
Karel Zak
Тема
Re: Problem with Day of Week
Дата
Msg-id
Pine.LNX.3.96.1010205175827.29540K-100000@ara.zf.jcu.cz
Ответ на
Re: Problem with Day of Week (Ross J. Reedstrom)
Список
Дерево обсуждения
Problem with Day of Week Keith Perry <keith@vcsn.com>
Re: Problem with Day of Week "Brian C. Doyle" <bcdoyle@mindspring.com>
Re: Problem with Day of Week Karel Zak <zakkr@zf.jcu.cz>
Re: Problem with Day of Week "Ross J. Reedstrom" <reedstrm@rice.edu>
Re: Problem with Day of Week Karel Zak <zakkr@zf.jcu.cz>
Re: Problem with Day of Week <keith@vcsn.com>
Re: Problem with Day of Week Karel Zak <zakkr@zf.jcu.cz>
Re: Problem with Day of Week <keith@vcsn.com>
On Mon, 5 Feb 2001, Ross J. Reedstrom wrote:
> On Mon, Feb 05, 2001 at 05:15:47PM +0100, Karel Zak wrote:
> >
> > test=# select date_part('dow','2001-02-11'::timestamp);
> > date_part
> > -----------
> > 0
> >
> > test=# select to_char('2001-02-11'::timestamp, 'D');
> > to_char
> > ---------
> > 1
> >
> >
> > date_part is based on zero - use range 0-6
> > to_char is based on one - use range 1-7
> >
>
> My understanding is that one is ISO, the other is for Oracle
> compatability, is that not right Karel?
You are right, Larry Ellison use 1-7 (he must, if the PostgreSQL to_char()
is 100% comapatible :-)
I don't know if 0-6 is like ISO (Thomas?), but surely it's like POSIX.
Karel
В списке pgsql-sql по дате отправления