Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

vb.net

0 views
Skip to first unread message

umakutty

unread,
Dec 22, 2009, 2:41:11 AM12/22/09
to
How to count the weeks in a given year?


Submitted via EggHeadCafe - Software Developer Portal of Choice
Build a Script-Only ASP.NET 2.0 Data Editing Page
http://www.eggheadcafe.com/tutorials/aspnet/274279bd-d101-4925-9857-246a66a85014/build-a-scriptonly-aspn.aspx

Cor Ligthert[MVP]

unread,
Dec 22, 2009, 3:08:31 AM12/22/09
to
1, 2, 3, until 52

To get a week

http://www.vb-tips.com/DateTimeCalc.aspx

Success

Cor

"Uma Kutty" wrote in message news:20091222241...@gmail.com...

Martin H.

unread,
Dec 22, 2009, 7:47:37 AM12/22/09
to
Hello Uma,

you would have to find out when the first week starts, which can be any
day between 29th December and 4th January. Then, you would have to count
the weeks (or develop a formula). For more infos about dates:
http://en.wikipedia.org/wiki/ISO_8601

Best regards,

Martin

Family Tree Mike

unread,
Dec 22, 2009, 9:53:19 AM12/22/09
to

How about using Calendar.GetWeekOfYear(), passing in the last day of
December? It is quite flexible in letting you specify how to define the
start date and determination of a full week.

--
Mike

Cor Ligthert[MVP]

unread,
Dec 23, 2009, 1:55:46 PM12/23/09
to
Mike,

American? the week calendar (more used in the EU then the month calendar for
business) has an ISO start day, as far as I know is it not simply going like
your formula.

:-)

Cor


"Family Tree Mike" <FamilyT...@ThisOldHouse.com> wrote in message
news:OmoX9Zxg...@TK2MSFTNGP05.phx.gbl...

Family Tree Mike

unread,
Dec 23, 2009, 6:53:40 PM12/23/09
to

I guess I need to get out of the country more! :-)

--
Mike

0 new messages