DateTime now = DateTime.Now; MessageBox.Show((now.DayOfYear).ToString());
Int DayNum = DateTime.Now.DayOfYear;
DateTime a; a.DayOfYear 就是这一年中的第几