Date_part & cast.

From: Benoit Brodard <benoit(at)cyberdeck(dot)net>
To: pgsql-sql(at)postgresql(dot)org
Subject: Date_part & cast.
Date: 2000-04-21 07:42:33
Message-ID: 39000669.7F87401@cyberdeck.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

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.

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Sondaar, Roelof 2000-04-21 11:04:00 RE: Threaded Records in SQL: Advice Needed
Previous Message Hiroshi Inoue 2000-04-21 06:50:48 RE: TOAST (was: BLOB)