|Subject||Re: [firebird-support] Re: EXTRACT(WEEK FROM DATE) - how to get the right year?|
At 11:01 PM 21/12/2008, you wrote:
>--- In firstname.lastname@example.org, Dom Scarlatti >Firebird complies with the ISO standard. You can't tweak it to work some other way, so using this method doesn't depend on where you live, but whether your requirements comply with the international standards.
>> alter table xyz
>> add WeekOfTheYear
>> computed by (
>> when (extract(month from CertainDate) = 12)
>> and (extract(week from CertainDate) = 1)
>> 'Week '||extract (WEEK from CertainDate)||' of year '
>> || (1 + (extract( year from CertainDate)))
>> else 'Week '||extract (WEEK from CertainDate)||' of year '
>> ||extract( year from CertainDate)
>> end )
>Just be careful in which area of the world you are.
>There are different system on what the "first" week is: