Convert date to number of week

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
 
H

Herfried K. Wagner [MVP]

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>
 
C

Claes Bergefall

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top