Date, time and Week number
C#
2
Posts
2
Posters
0
Views
1
Watching
-
Hi, Does anyone know wether there is some kind of element (like a DATETIMEPICKER) to get the number of the week. For example the second week of February is aprox. week 6. It doesn't matter in wich data type the numebr (string or int\long\short) is returned. Please help me! Boudewijn Ector The Netherlands
-
Hi, Does anyone know wether there is some kind of element (like a DATETIMEPICKER) to get the number of the week. For example the second week of February is aprox. week 6. It doesn't matter in wich data type the numebr (string or int\long\short) is returned. Please help me! Boudewijn Ector The Netherlands
I may not be thinking this through, but how about: int nWeek = Convert.ToInt32(DateTime.Now.DayOfYear / 7.0); Nick.