Purpose:
I need to output to a textbox the year and the week of year.
The user will pick a date out of a DateTimePicker tool. The systsem should be able to output the year and the weekofyear.
How do I make the program calculate the weekofyear based on the current year and have a 'counter' so every subsequent year (2004,2005 etc etc) it will know, is one of the dates to be compared.
There will be no date earlier than 1999.
The reset date should be Jan 1 of each year
I am able to calculate the number of weeks since 1999 with this code:
'Week_Of_Year = DateDiff("d", FirstDay, PickedDate, FirstDayOfWeek.Saturday) / 7
Where FirstDay is a constant 12/29/1999
Where PickedDate is the date where the user picks using the DateTimePickerTool
Thank you and very much appreciated.
I need to output to a textbox the year and the week of year.
The user will pick a date out of a DateTimePicker tool. The systsem should be able to output the year and the weekofyear.
How do I make the program calculate the weekofyear based on the current year and have a 'counter' so every subsequent year (2004,2005 etc etc) it will know, is one of the dates to be compared.
There will be no date earlier than 1999.
The reset date should be Jan 1 of each year
I am able to calculate the number of weeks since 1999 with this code:
'Week_Of_Year = DateDiff("d", FirstDay, PickedDate, FirstDayOfWeek.Saturday) / 7
Where FirstDay is a constant 12/29/1999
Where PickedDate is the date where the user picks using the DateTimePickerTool
Thank you and very much appreciated.