Received: from wallace.ece.rice.edu (wallace.ece.rice.edu [128.42.12.154]) by mail.postgresql.org (8.11.1/8.11.1) with ESMTP id f15GrOx32841 for ; Mon, 5 Feb 2001 11:53:26 -0500 (EST) (envelope-from reedstrm@rice.edu) Received: by rice.edu via sendmail from stdin id (Debian Smail3.2.0.102) for pgsql-sql@postgresql.org; Mon, 5 Feb 2001 10:53:15 -0600 (CST) Date: Mon, 5 Feb 2001 10:53:15 -0600 From: "Ross J. Reedstrom" To: Karel Zak Cc: Keith Perry , pgsql-sql@postgresql.org Subject: Re: Problem with Day of Week Message-ID: <20010205105315.C9675@rice.edu> Mail-Followup-To: Karel Zak , Keith Perry , pgsql-sql@postgresql.org References: <3A75AE8C.3E6D7F53@vcsn.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii User-Agent: Mutt/1.0i In-Reply-To: ; from zakkr@zf.jcu.cz on Mon, Feb 05, 2001 at 05:15:47PM +0100 X-Archive-Number: 200102/51 X-Sequence-Number: 1221 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? Ross