pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Ross J. Reedstrom <reedstrm@rice.edu>
To: Karel Zak <zakkr@zf.jcu.cz>
Cc: Keith Perry <keith@vcsn.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: Problem with Day of Week
Date: Mon, 5 Feb 2001 10:53:15 -0600
Message-ID: <20010205105315.C9675@rice.edu> (raw)
In-Reply-To: <Pine.LNX.3.96.1010205170718.29540F-100000@ara.zf.jcu.cz>
References: <3A75AE8C.3E6D7F53@vcsn.com>
	<Pine.LNX.3.96.1010205170718.29540F-100000@ara.zf.jcu.cz>

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



view thread (8+ messages)  latest in thread

Message-ID: <20010205105315.C9675@rice.edu>
Permalink:  ../20010205105315.C9675@rice.edu/
Also on:    postgresql.org/message-id/20010205105315.C9675@rice.edu

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-sql@postgresql.org
  Cc: reedstrm@rice.edu, zakkr@zf.jcu.cz, keith@vcsn.com
  Subject: Re: Problem with Day of Week
  In-Reply-To: <20010205105315.C9675@rice.edu>
  References: <3A75AE8C.3E6D7F53@vcsn.com> <Pine.LNX.3.96.1010205170718.29540F-100000@ara.zf.jcu.cz> <20010205105315.C9675@rice.edu>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox