Subject | Re: [firebird-support] Re: extract(week from d) |
---|---|
Author | Ivan Prenosil |
Post date | 2006-11-30T14:35:45Z |
>> but as Helen pointed out, you have to tell your requirementsThis still does not look like clear/exact specification.
> *exactly*.
>> E.g. 1-1-2006 is Sunday, so according to iso standard
>> it actually belongs to last week of 2005. What restul do you expect
>> this week-function to return ?
>
> I prefer following ISO 8601 standard, so 2006-01-01 belongs to last
> week of 2005 and First week of 2006 begins with 2006-01-02.
> Exactly so as in my paper-calender on my desk :-)
If you really had function that would return number 1-53, than
- your query would group week 5 from 2006 with week 5 from 2005 with week 5 from 2004 ...
Is it what you want ?
- first day of year 2006-01-01 belongs to week 52/2005,
last day of year 2006-12-31 belongs to week 52/2006,
i.e. both would fall into the same group 52.
Is it what you want ?
Ivan
http://www.volny.cz/iprenosil/interbase/