Re: Postgresql likes Tuesday...

From: "Clark C(dot) Evans" <cce(at)clarkevans(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Hannu Krosing <hannu(at)tm(dot)ee>, Rod Taylor <rbt(at)rbt(dot)ca>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Postgresql likes Tuesday...
Date: 2002-10-01 03:07:53
Message-ID: 20021001030753.GA85264@doublegemini.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Sep 30, 2002 at 06:49:34PM -0400, Tom Lane wrote:
| The other issue is what
| to_date(...,'WWYYYY') should do to produce a date representing a week
| number. Shouldn't it always produce the first date of that week?
| If not, what other conventions make sense?

IMHO, it should choose the "Week Ending" date. This is
usually what all of the companies that I've worked with
want to see for the "day" column. For example, the
defect^H^H^H^H^H^H quality reports at Ford Motor in 1993
used a Predo of part by defect by week-ending. Where
week ending date was the Sunday following the work
week (monday-sunday). In various project data in
companies that I've worked with before and after 1993
I've yet to see a "weekly" report that didn't give
the week ending... alhtough some did use Friday or
Saturday for the week ending.

One hickup with this choice is that you'd probably
want the time portion to be 23:59:59.999 so that it
includes everything up to the end of the day. Hmm.

Clark

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2002-10-01 03:35:41 Re: 7.2.3 patching done
Previous Message Tom Lane 2002-09-30 22:49:34 Re: Postgresql likes Tuesday...