DateTime fromdt = dtpFromDate.Value.Date; DateTime todt = dtpToDt.Value.Date; int fday = fromdt.Day; int fmonth = fromdt.Month; int fyear = fromdt.Year; DateTime oldDate = new DateTime(fyear, fmonth, fday); TimeSpan ts = todt - oldDate; int differenceInDays = ts.Days; MessageBox.Show(differenceInDays.ToString());