16. Februar 2012 17:35
Enddatum := 311212D;
i := Date2DWY(Enddatum, 3);
Message('%1', i);
i := Date2DMY(Enddatum, 3);
Message('%1', i);
16. Februar 2012 17:51
The date 01/01/94 corresponds to:
The day of the week: 6
The week number: 52
The year: 1993
This example shows that the system regards the date 01/01/94 as day number 6 (Saturday) in week number 52 in the year 1993.
16. Februar 2012 18:06
If the input date to the DATE2DWY function is in a week which spans two years, the DATE2DWY function computes the output year as the year that has more days of the given week. For example, if the input date is 010109, then the date is in a week that starts on Monday, December 29, 2008, and ends Sunday, January 4, 2009. This week has three days in 2008 and four days in 2009, so the output year is 2009.
The date 01/01/09 corresponds to:
The day of the week: 4
The week number: 1
The year: 2009
This example shows that the date 01/01/09 is regarded as day number 4 (Thursday) in week number 1 in the year 2009.