Solved

Start Week Date

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

Expert Comment

by:imitchie
ID: 20409650
What language are you after? VB.net?
0
 
LVL 7

Accepted Solution

by:
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

0
 
LVL 1

Expert Comment

by:Computer101
ID: 20952995
Forced accept.

Computer101
Community Support Moderator
0

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 asp.net page 1 33
Class object 2 27
SQL Login 17 40
ASP.net 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