Convert date to number of week

  • Thread starter Thread starter Manekurt
  • Start date Start date
M

Manekurt

Hello, does anyone knows how to convert a date, into a number of week of an
year? for example
mm/dd/yyyy 01/04/2006 convert to 1 (week number 1 of the year)


Thanik you
 
Manekurt said:
Hello, does anyone knows how to convert a date, into a number of week of
an year? for example
mm/dd/yyyy 01/04/2006 convert to 1 (week number 1 of the year)

The .NET Framework provides a way to do that
('System.Globalization.Calendar.GetWeekOfYear'), but notice that this method
is not ISO-8601-compliant. You may want to look for an ISO-compliant
solution here:

<URL:http://www.google.de/groups?q=dotnet+week+iso+8601>
 
Herfried K. Wagner said:
The .NET Framework provides a way to do that
('System.Globalization.Calendar.GetWeekOfYear'), but notice that this
method
is not ISO-8601-compliant. You may want to look for an ISO-compliant
solution here:

<URL:http://www.google.de/groups?q=dotnet+week+iso+8601>

Also note that the bug described at http://support.microsoft.com/?id=200299
still exists. It affects the DateTime and Calendar stuff in .NET too and not
just in classic VB as it says in the article (or at least it did in 2003,
haven't verified it in 2005)

/claes
 
Back
Top