× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



I just found the following Wikipedia entry, which explains the rules and the
exceptions to the rules governing week 1 or 53 in a year:
http://en.wikipedia.org/wiki/ISO_week_date

According to that, '12/29/2008' is year 2009, week 1, weekday 1.

More info about ISO 8601 at http://en.wikipedia.org/wiki/ISO_8601

In other words: User beware! If you are building an application that's based
on the ISO number of the week you will end up with (apparently) unexpected /
incorrect results. Be sure to also include an ISO - based calculation of the
year's value, so that a date like '12/29/2008' returning ISO-week '1'
doesn't throw your calculations in disarray ... that's because hidden behind
the week '1' value there is a year value of '2009'!

Which brings up the question: Is there a function YEAR_ISO ??? Or some other
function which returns the ISO year, week and weekday together? I couldn't
find any ...

Regards,
Ulrich Krueger

-----Ursprüngliche Nachricht-----
Von: midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx] Im Auftrag von Walden H. Leverich
Gesendet: Tuesday, 06. January 2009 18:48
An: Midrange Systems Technical Discussion
Betreff: Week_ISO and the last week of 2008

According to the spec week_iso should have returned 53 for the end of
2008. On V5R4 I'm getting 1. Can someone please try:



select week_iso(date('12/29/08')) from sysibm/sysdummy1



on their machine and let me know what they get.



Thanks,

-Walden



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.