DateTime d1 = new DateTime(2014, 9, 19, 7, 0, 0); // 2014-09-19 7:00:00 DateTime d2 = new DateTime(2014, 9, 25, 7, 0, 0); // 2014-09-25 7:00:00 if (d1.Month == d2.Month && d1.Year == d2.Year) { // do what you need }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)