This is a discussion on How to find the Starting date of week from a particular date within the C# Programming forums, part of the Software Development category; hi How to find the Starting date of week from a particular date if i give particular date example:"...
| |||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
| |||
| hi How to find the Starting date of week from a particular date if i give particular date example:"15-07-2007" how can i get the starting date of this week as '12-07-2007' using c# |
| Sponsored Links |
| |||
| hi, try this. DateTime dateshow = Convert.ToDateTime("08/15/2007"); int count = Convert.ToInt32(dateshow.DayOfWeek); int startdifference = dateshow.DayOfYear - count; string year = dateshow.Year.ToString(); DateTime yearstart = Convert.ToDateTime("01/01/" + year); DateTime startDate = yearstart.AddDays(startdifference ); Regards Manivannan.s |
![]() |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Convert a date in milliseconds back to a date string | itbarota | HTML, CSS and Javascript Coding Techniques | 2 | 03-03-2008 09:03 PM |
| How can I find the day of the week for a given date. | itbarota | HTML, CSS and Javascript Coding Techniques | 2 | 02-01-2008 09:36 PM |
| How can I show the documents last modified date in the format: month, date, year, tim | Pvinothkumar | HTML, CSS and Javascript Coding Techniques | 3 | 12-28-2007 05:58 AM |
| How can I compare a date in a string with todays date? | itbarota | HTML, CSS and Javascript Coding Techniques | 2 | 12-18-2007 11:02 PM |
| How to convert a date to a globally accepted date format, in DOT NET 2005? | Archer | C# Programming | 1 | 07-25-2007 03:21 AM |