Thursday, January 19, 2012

Get Number of Day from Two Datetime Picker Value

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 ;  

vfpoledeb.1 provider is not registered on the local machine

Have u Install VFP Ole DB Provider in your System ? If No then Please Install it from following link. http://www.microsoft.com/download...