Click here to Skip to main content
15,900,258 members
Home / Discussions / C#
   

C#

 
AnswerRe: How to get first and last date given a year and a weeknr Pin
Richard MacCutchan9-Dec-09 3:42
mveRichard MacCutchan9-Dec-09 3:42 
GeneralRe: How to get first and last date given a year and a weeknr Pin
livez9-Dec-09 3:49
livez9-Dec-09 3:49 
GeneralRe: How to get first and last date given a year and a weeknr Pin
Richard MacCutchan9-Dec-09 4:06
mveRichard MacCutchan9-Dec-09 4:06 
GeneralRe: How to get first and last date given a year and a weeknr Pin
livez9-Dec-09 4:43
livez9-Dec-09 4:43 
GeneralRe: How to get first and last date given a year and a weeknr Pin
Richard MacCutchan9-Dec-09 5:03
mveRichard MacCutchan9-Dec-09 5:03 
GeneralRe: How to get first and last date given a year and a weeknr Pin
livez9-Dec-09 20:06
livez9-Dec-09 20:06 
GeneralRe: How to get first and last date given a year and a weeknr Pin
livez9-Dec-09 23:00
livez9-Dec-09 23:00 
AnswerRe: How to get first and last date given a year and a weeknr Pin
Abhinav S9-Dec-09 4:03
Abhinav S9-Dec-09 4:03 
Try this -

CultureInfo info = Thread.CurrentThread.CurrentCulture;
DateTime dt = info.Calendar.AddWeeks(new DateTime(YYYY, MM, DD), x); where x is no of weeks.


The interesting thing to note here is that if you use the first day of the first week of the previous year (i.e. 2008/12/28) evertything works fine. If you use new DateTime(2009, 1, 1),you would get that date plus 53 weeks which would not help you as per your query. Hope that makes sense Smile | :) .
AnswerRe: How to get first and last date given a year and a weeknr Pin
OriginalGriff9-Dec-09 4:04
mveOriginalGriff9-Dec-09 4:04 
AnswerRe: How to get first and last date given a year and a weeknr Pin
David Skelly9-Dec-09 4:14
David Skelly9-Dec-09 4:14 
GeneralRe: How to get first and last date given a year and a weeknr Pin
livez9-Dec-09 4:17
livez9-Dec-09 4:17 
GeneralRe: How to get first and last date given a year and a weeknr Pin
Richard MacCutchan9-Dec-09 4:23
mveRichard MacCutchan9-Dec-09 4:23 
GeneralRe: How to get first and last date given a year and a weeknr Pin
David Skelly9-Dec-09 4:25
David Skelly9-Dec-09 4:25 
GeneralRe: How to get first and last date given a year and a weeknr Pin
Richard MacCutchan9-Dec-09 5:04
mveRichard MacCutchan9-Dec-09 5:04 
QuestionHow to make FolderBrowserDialog TopMost window. Pin
Calla9-Dec-09 3:09
Calla9-Dec-09 3:09 
AnswerRe: How to make FolderBrowserDialog TopMost window. Pin
Calla9-Dec-09 3:20
Calla9-Dec-09 3:20 
QuestionDo not close ContextMenuStrip Pin
eyalle9-Dec-09 2:14
eyalle9-Dec-09 2:14 
AnswerRe: Do not close ContextMenuStrip Pin
BillWoodruff9-Dec-09 12:19
professionalBillWoodruff9-Dec-09 12:19 
GeneralRe: Do not close ContextMenuStrip Pin
eyalle9-Dec-09 19:59
eyalle9-Dec-09 19:59 
GeneralRe: Do not close ContextMenuStrip Pin
BillWoodruff11-Dec-09 5:06
professionalBillWoodruff11-Dec-09 5:06 
GeneralRe: Do not close ContextMenuStrip Pin
eyalle13-Dec-09 20:38
eyalle13-Dec-09 20:38 
GeneralRe: Do not close ContextMenuStrip Pin
BillWoodruff14-Dec-09 3:25
professionalBillWoodruff14-Dec-09 3:25 
QuestionPositioning MdiChild in the Parent Form Pin
Randal Vance Cunanan9-Dec-09 2:14
Randal Vance Cunanan9-Dec-09 2:14 
AnswerRe: Positioning MdiChild in the Parent Form Pin
Randal Vance Cunanan9-Dec-09 2:18
Randal Vance Cunanan9-Dec-09 2:18 
Questionclasses as enum (or something like an enum) Pin
Nathan Gloyn9-Dec-09 1:53
Nathan Gloyn9-Dec-09 1:53 

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.