Feed on
Posts
Comments

This sample shows how to get the last day of the current week. It easily could be reconfigured to get any day of the week of any date.

DateTime dtWET = DateTime.Today;

//get the last day of the week. If you need another day change the 6 to a number between 0 and 6. Please note that depending on you regional settings the week 0 day could be Sunday or Monday.
dtWET = dtWET.AddDays((-(Convert.ToInt32(dtWET.DayOfWeek))) + 6);

dtWET = new DateTime(dtWET.Year, dtWET.Month, dtWET.Day, 22, 00, 0);

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • del.icio.us
  • dzone
  • Netscape
  • digg
  • YahooMyWeb
  • Technorati

Trackback URI | Comments RSS

Leave a Reply

This is a captcha-picture. It is used to prevent mass-access by robots. (see: www.captcha.net)

You must read and type the 5 chars within 0..9 and A..F, and submit the form.

  

Oh no, I cannot read this. Please, generate a