Solved

Start Week Date

Posted on 2007-12-04
4
499 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

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

One of the pain points with developing AJAX, JavaScript, JQuery, and other client-side behaviors is that JavaScript doesn’t allow for cross domain request for pulling content. For example, JavaScript code on www.johnchapman.name could not pull conte…
Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

744 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

9 Experts available now in Live!

Get 1:1 Help Now