From: Uma on
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
From: Cor Ligthert[MVP] on
1, 2, 3, until 52

To get a week

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

Success

Cor

"Uma Kutty" wrote in message news:200912222418mercury.uma(a)gmail.com...
> 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

From: Martin H. on
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
From: Family Tree Mike on
On 12/22/2009 2:41 AM, Uma Kutty wrote:
> 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

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
From: Cor Ligthert[MVP] on
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" <FamilyTreeMike(a)ThisOldHouse.com> wrote in message
news:OmoX9ZxgKHA.5644(a)TK2MSFTNGP05.phx.gbl...
> On 12/22/2009 2:41 AM, Uma Kutty wrote:
>> 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
>
> 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