Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Converting DayofWeek value to Integer

Status
Not open for further replies.

roccorocks

Programmer
Nov 26, 2002
248
US
I want to convert System.DateTime.Now.DayOfWeek.ToString() into the integer value of the day of the week "1 - 7". Has anyone done this B4?

Thanks,

Rocco
 
This might work:
Code:
int dow = ((int)DateTime.Now.DayOfWeek) + 1;
Chip H.


____________________________________________________________________
Click here to learn Ways to help with Tsunami Relief
If you want to get the best response to a question, please read FAQ222-2244 first
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top