get date value from a week

  • Thread starter Thread starter Guoqi Zheng
  • Start date Start date
G

Guoqi Zheng

We have a table which save the value of week of year.

tblWeekOfYear
autoid int
Year int
week

This we use to identify a week. However how can covert the week into a date?

For example, for row.
year = 2000
week = 34

I need to get the date of first day at week 34 on year 2000. Howe can I do this?
 
Something along the line

DateTime D = DateTime.Parse ("1/1/2000").AddDays(7*34);
D = D.AddDays(-(int)D.DayOfWeek);

I didn't test it, you may have to adjust...

/LM
 
Back
Top