Solved

Start Week Date

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

ScreenConnect 6.0 Free Trial

Explore all the enhancements in one game-changing release, ScreenConnect 6.0, based on partner feedback. New features include a redesigned UI, app configurations and chat acknowledgement to improve customer engagement!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
C#  Radio button search for Date not DateTime 4 48
jquery progress bar 3 44
asp enable view state 1 24
transaction in asp.net, sql server 6 37
Sometimes in DotNetNuke module development you want to swap controls within the same module definition.  In doing this DNN (somewhat annoyingly) swaps the Skin and Container definitions to the default admin selections.  To get around this you need t…
In .NET 2.0, Microsoft introduced the Web Site.  This was the default way to create a web Project in Visual Studio 2005.  In Visual Studio 2008, the Web Application has been restored as the default web Project in Visual Studio/.NET 3.x The Web Si…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

825 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