pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Benoit Brodard <benoit@cyberdeck.net>
To: pgsql-sql@postgresql.org
Subject: Date_part & cast.
Date: Fri, 21 Apr 2000 09:42:33 +0200
Message-ID: <39000669.7F87401@cyberdeck.net> (raw)

Hi,

We use PostgreSQL 6.5.3 on i586-pc-linux-gnu, compiled by gcc 2.7.2.3, and we get the following results with date_part :

db=> select date_part( 'dow', date '20000421' );
date_part
---------
        5
(1 row)

db=> select date_part( 'dow', date ( '20000421' ) );
date_part
---------
        6
(1 row)

Is this correct ? If yes, I could not find any explanation for the second result which also differ from "select date_part( 'dow', date (20000421)  );"

Thanks for any help,

-Benoit Brodard.






view thread (4+ messages)  latest in thread

Message-ID: <39000669.7F87401@cyberdeck.net>
Permalink:  ../39000669.7F87401@cyberdeck.net/
Also on:    postgresql.org/message-id/39000669.7F87401@cyberdeck.net

 · 

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: benoit@cyberdeck.net
  Subject: Re: Date_part & cast.
  In-Reply-To: <39000669.7F87401@cyberdeck.net>
  References: <39000669.7F87401@cyberdeck.net>

* 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