| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
|---|---|
| To: | Clodoaldo Pinto <clodoaldo(dot)pinto(at)gmail(dot)com> |
| Cc: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>, "pgsql-general postgresql(dot)org" <pgsql-general(at)postgresql(dot)org> |
| Subject: | Re: extract (dow/week from date) |
| Date: | 2005-08-21 02:06:39 |
| Message-ID: | 18897.1124589999@sss.pgh.pa.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
Clodoaldo Pinto <clodoaldo(dot)pinto(at)gmail(dot)com> writes:
> I'm ordering by date just to show that sunday, the 0th day of the
> week, is the last day of a given week, which is not what I need.
extract(week) follows the ISO definition of week, which is pretty
strange anyway, but in particular it says that weeks start on Monday.
extract(dow) follows a different convention. There's not a lot we
can do about this --- we're certainly not going to change extract(week),
and I can't see changing extract(dow) either.
If you feel that weeks start on Sunday you should ignore extract(week).
regards, tom lane
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Bernard | 2005-08-21 02:33:53 | CSV import issue - please help |
| Previous Message | Stephan Szabo | 2005-08-21 01:54:55 | Re: extract (dow/week from date) |