We can easily find out the Total number of day from Two Datetime Picker value using TimeSpan
int totalDay=0;
TimeSpan ts = new TimeSpan(Convert.ToDateTime(objApplyLeave.Apply_ToDate).Ticks - Convert.ToDateTime(objApplyLeave.Apply_FromDate).Ticks);
totalDay = ts.TotalDays + 1 ;
Comments
Post a Comment