Solved

Start Week Date

Posted on 2007-12-04
4
527 Views
Last Modified: 2008-02-21
How find the startdate of the week in given month and given year.
0
Comment
Question by:asterUser
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

Question has a verified solution.

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

Lots of people ask this question on how to extend the “MembershipProvider” to make use of custom authentication like using existing database or make use of some other way of authentication. Many blogs show you how to extend the membership provider c…
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…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

733 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