Click here to Skip to main content
12,896,849 members (53,392 online)
Click here to Skip to main content
Add your own
alternative version

Tagged as


1 bookmarked
Posted 22 Apr 2010

Get week from Specific date

, 22 Apr 2010 CPOL
Rate this:
Please Sign up or sign in to vote.
DateTime date = DateTime.Now;System.Globalization.CultureInfo cult_info = System.Globalization.CultureInfo.CreateSpecificCulture("no");System.Globalization.Calendar cal = cult_info.Calendar;int weekNo = cal.GetWeekOfYear(date, cult_info.DateTimeFormat.CalendarWeekRule,...
DateTime date = DateTime.Now;

System.Globalization.CultureInfo cult_info = System.Globalization.CultureInfo.CreateSpecificCulture("no");

System.Globalization.Calendar cal = cult_info.Calendar;

int weekNo = cal.GetWeekOfYear(date, cult_info.DateTimeFormat.CalendarWeekRule, cult_info.DateTimeFormat.FirstDayOfWeek);


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


About the Author

Peace ON
Software Developer (Senior)
India India
Short Stories Stories We Live...

You may also be interested in...

Comments and Discussions

GeneralReason for my vote of 4 Good tip Pin
subodhkant2-Feb-11 2:50
membersubodhkant2-Feb-11 2:50 
GeneralReason for my vote of 2 I live in sweden where week numbers ... Pin
Söderlund7-Jul-10 8:56
memberSöderlund7-Jul-10 8:56 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Permalink | Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.170424.1 | Last Updated 23 Apr 2010
Article Copyright 2010 by Peace ON
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid