Click here to Skip to main content
Click here to Skip to main content
Alternatives (3)

DateTime Extension Method to Give Week Number

By , 14 Jul 2011


Members may post updates or alternatives to this current article in order to show different approaches or add new features.

6 Sep 2011  
What about that :CultureInfo.CurrentCulture.Calendar.GetWeekOfYear(pd_date, CalendarWeekRule.FirstFourDayWeek, DayOfWeek.Monday);
8 Sep 2011  
Jani Giannoudis
Here another approach taken from my article Time Period Library for .NET[^], which returns addditional the year of the week.// ------------------------------------------------------------------------public enum YearWeekType{ Calendar, Iso8601,} // enum YearWeekType //...
19 Jul 2011  
Gustav Brock
There certainly is a direct method in .NET to obtain the ISO week number.It is even quite simple; it is, however, buggy - as ISO week numbering "always" has been at MSFT since VB 3.0 and Access Basic (of Access 2.0) and through all versions up to and including VBA of Office 2010. It is a big...


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

About the Author

Wales Wales
Born at an early age, he grew older. At the same time, his hair grew longer, and was tied up behind his head.
Has problems spelling the word "the".
Invented the portable cat-flap.
Currently, has not died yet. Or has he?
Follow on   Google+

| | Privacy | Mobile
Web01 | 2.8.140415.2 | Last Updated 15 Jul 2011
Article Copyright 2011 by OriginalGriff
Everything else Copyright © CodeProject, 1999-2014
Terms of Use
Layout: fixed | fluid