tags:

views:

244

answers:

3

I have a date such as April,1,2009. I want to know what the weekday is, i.e. whether April 1 is a Monday, Tuesday etc. Likewise I want to check weekday of each day in the month of April.

+4  A: 

Use the DayOfWeek property:

new DateTime(2009, 4, 1).DayOfWeek
Jon Skeet
+2  A: 

You can use the DayOfWeek property.

Zhaph - Ben Duguid
A: 

If your computer language of choice doesn't have a DayOfWeek function, you can use Zeller's Congruence which returns the day of the week using simple integer arithmetic.

Alnitak