Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Team,
For the below examples please let me know whether my understanding on the weekyear function is right or not
weekyear( '1997-12-30' ), weekyear( '1999-01-02' )
if SET FirstWeekDay=6;
SET BrokenWeeks=0;
SET ReferenceDay=0;
SET FirstMonthOfYear=1;
Weekyear calculates the week number of a given date and if that week number is in the bridge between two years it will return the year which has the maximum % of that week number. if it's not in bridge it will return the same year itself.
Thank you
This wil help you
For the date '1997-12-30', the week number is 1, and since this week is entirely within the year 1997, the Weekyear function will return 1997.
For the date '1999-01-02', the week number is 1 as well, but this week overlaps two years: 1998 and 1999. Since the majority of the days in this week fall in 1999, the Weekyear function will return 1999.
Go through below link for more info
This wil help you
For the date '1997-12-30', the week number is 1, and since this week is entirely within the year 1997, the Weekyear function will return 1997.
For the date '1999-01-02', the week number is 1 as well, but this week overlaps two years: 1998 and 1999. Since the majority of the days in this week fall in 1999, the Weekyear function will return 1999.
Go through below link for more info
For the date '1997-12-30', the week number is 1, and since this week is entirely within the year 1997, the Weekyear function will return 1997
1997-12-30 week number is 53. But majority is in 1997 itself