| From: | joost(at)snow(dot)nl |
|---|---|
| To: | pgsql-bugs(at)postgresql(dot)org |
| Subject: | year and weeknumbers (proposal included) |
| Date: | 2003-01-27 20:53:27 |
| Message-ID: | 20030127210914.EF12C1460862@intern.snow.nl |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-bugs |
hi,
last year (2002) the date december 31st is in week 1 of 2003.
it is not possible to get this out of a date-column using EXTRACT or
to_char.
to_char( '2002-12-31', 'WW' ) returns 1, and
to_char( '2002-12-31', 'YYYY' ) returns 2002 (as expected)!
the format for retrieving the year with respect to week-numbering
could be something like IY, IYY, IYYY, IYYYY.
to_char( '2002-12-31', 'IYYYY' ) returns 2003.
regards,
Joost Helberg
--
Joost Helberg
Technisch Directeur Snow BV http://snow.nl Tel 0418-653333 Fax 0418-653666
Voorzitter VOSN http://www.vosn.nl Tel 0418-653336 Fax 0418-653666
GPG PblKey fprnt= 738C 20AC A545 02AE 6F5D 5A9F D724 EB4B 2B10 150B
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Peter Eisentraut | 2003-01-27 21:11:26 | Re: Bug #880: COMMENT ON DATABASE depends on current database |
| Previous Message | Hubert depesz Lubaczewski | 2003-01-27 20:38:33 | recent (just got from cvs) build doesn't run nicely |