Start Week Date

Posted on 2007-12-04
Last Modified: 2008-02-21
How find the startdate of the week in given month and given year.
Question by:asterUser
LVL 25

Expert Comment

ID: 20409650
What language are you after?

Accepted Solution

bungHoc earned 250 total points
ID: 20409854
Use DateTime.DayOfWeek

Hope it helps..
int year = 2007, month = 12;

int daysInMonth = System.DateTime.DaysInMonth(year, month);

for (int i = 0; i< daysInMonth; i++)


  DateTime date = DateTime.Parse(year, month, i)

  if (date.DayOfWeek == DayOfWeek.Monday)


     // Start Date of the week.



Open in new window


Expert Comment

ID: 20952995
Forced accept.

Community Support Moderator

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
error on the page 1 33
Class object 2 27
SQL Login 17 40 Run 3 sliders vertically as opposed to horizontally 9 20
In an ASP.NET application, I faced some technical problems. In this article, I list them out and show the solutions that I found.  I hope it will be useful. Problem: After closing a pop-up window, the parent page should be refreshed automaticall…
Today is the age of broadband.  More and more people are going this route determined to experience the web and it’s multitude of services as quickly and painlessly as possible. Coupled with the move to broadband, people are experiencing the web via …
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…

896 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now