Powered by QM on a Linux server
Help and Support

KnowledgeBase 00053: ISO Week Number Conversions

Last updated: 27 Dec 2018
Applies to: All versions
Top level index       Full Index Search Tips
Previous article     Next article

The International Organisation for Standardisation (ISO) defines the concept of week numbers as widely used in business and often printed in diaries. QM provides date conversion code elements to work with ISO week numbers.

Week Numbers

ISO 8601 defines the rules such that week 1 is the week that has the first Thursday of the year in it. The ISO week begins on Monday and hence, based on this definition, it can be seen that a calendar date in the last few days of a year may, when viewed as an ISO 8601 date, lie in the first week of the next ISO year. Conversely, the first few days of the calendar year may be in the last week of the previous ISO year. Also, an ISO year may have either 52 or 53 weeks.

Date Conversion Code Elements

The WI element of the D (date) or E (epoch) output conversion codes returns the ISO week number in which the date lies. The YI element returns the ISO year number.

These elements are not supported in input conversions as they reference an entire week and not a specific date.

Related Articles


Please tell us if this article was helpful
Very     Slightly     Not at all
Email (optional)