Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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

pgsql-sql by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group