From: | Jean-Luc Lachance <jllachan(at)sympatico(dot)ca> |
---|---|
To: | Pgsql-General <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Timestamp problems...wrong weeks. |
Date: | 2004-04-29 21:06:00 |
Message-ID: | 40916E38.4070308@sympatico.ca |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Personnaly, I think this use of W is useless -- anybody can dewide the
day of the month by 7. A more appropriate use of W might be for the
week number to start with the first week with ALL dates in the month.
An alternate interpretation might be to start with the first week that
has at least one day in the month. The next issue is do you start the
week on Sunday, Saturday or Monday...
JLL
Andrew Sullivan wrote:
> On Thu, Apr 29, 2004 at 02:42:49PM -0400, Campano, Troy wrote:
>
>>This is causing my reports to print out incorrect data.
>>Do you know why this would happen? Am I doing something wrong?
>
>
> I think you may be misunderstanding what "W" means:
>
> week of month (1-5) (The first week starts on the first day of the
> month.)
>
> In April 2004, 1 April is Thurs, so
>
> 1-7 -> W1
> 8-14 -> W2
> 15-21 -> W3
> 22-28 -> W4
> 29-30 -> W5 == W1 of May
>
> This is also why 8 May is in week 2 of May, but 7 May is on week 1.
>
> A
>
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2004-04-29 21:31:28 | Re: Arbitrary precision modulo operation |
Previous Message | Andrew Sullivan | 2004-04-29 20:40:52 | Re: postgresql idle |