Problem with Day of Week

From: Keith Perry <keith(at)vcsn(dot)com>
To: pgsql-sql(at)postgresql(dot)org
Subject: Problem with Day of Week
Date: 2001-01-29 17:55:24
Message-ID: 3A75AE8C.3E6D7F53@vcsn.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Greetings,

I notice some talk about date problems and interestingly enough planning
out an application in which I will need to be able to manipulate dates.
I notice however that there seems to be a discrepancy with the day or
week in 7.0.3

---

pmhcc=# select date_part('dow','now'::timestamp);
date_part
-----------
1
(1 row)

pmhcc=# select to_char('now'::timestamp,'D');
to_char
---------
2
(1 row)

pmhcc=# select version();
version
---------------------------------------------------------------------
PostgreSQL 7.0.3 on i686-pc-linux-gnu, compiled by gcc egcs-2.91.66
(1 row)

pmhcc=# select now();
now
------------------------
2001-01-29 12:57:46-05
(1 row)

---

Now as far as I know, Sunday is supposed to 1, so I would think that
date_part is doing something funky unless I am mis-understanding
something. I was hoping that someone might be able to shead some light
on this. Thanks.

Keith C. Perry
VCSN, Inc.
http://vcsn.com

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Jan Wieck 2001-01-29 18:10:37 Re: BLOB HOWTO??
Previous Message Bruce Momjian 2001-01-29 17:42:28 Re: BLOB HOWTO??