How do I get the day of a week in integer format? I know ToString will return only a string.
DateTime ClockInfoFromSystem = DateTime.Now; int day1; string d
Another way to get Monday with integer value 1 and Sunday with integer value 7
int day = ((int)DateTime.Now.DayOfWeek + 6) % 7 + 1;