The AX documentation states that the WkofYr function calculates the week of the year in which a date is located according to the ISO 8601 specification.
The ISO standard states:- The first week of the year is defined as beginning on the Monday of the week in which the first Thursday of January occurs. So 01/01/2010 ( a friday ) is week 53, i.e. the end of the last week of the previous year. It isn't a bug, it is working correctly. --- In Axapta-Knowledge-Village@yahoogroups.com, Agus Riyadi <agusa...@...> wrote: > > Dear All, > > Using Ax built-in function WkOfYr I get the following result : > > 1 Jan 2005 => 53 1 Jan 2006 => 52 1 Jan 2007 => 1 1 Jan 2008 => 1 1 Jan 2009 > => 1 1 Jan 2010 => 53 1 Jan 2011 => 52 1 Jan 2012 => 52 1 Jan 2013 => 1 1 > Jan 2014 => 1 1 Jan 2015 => 1 1 Jan 2016 => 53 1 Jan 2017 => 52 1 Jan 2018 > => 1 1 Jan 2019 => 1 1 Jan 2020 => 1 > > I thought it should always returns 1. Is there any fix on this ? > > Thanks and best regards, > > Agus >