Iam developing an leave management application. i want to find number of days a member applied the leaves. iam getting error in finding the days between the two selected dates in ajax calender tool kit.
my error is
Compiler Error Message: CS0029: Cannot implicitly convert type 'System.TimeSpan' to 'System.DateTime'
my code is
tbStartdate_CalendarExtender.StartDate = DateTime.Today; tbEndDate_CalendarExtender.StartDate = DateTime.Today.AddDays(1); DateTime StartDate1 = DateTime.ParseExact(tbStartdate.Text, "dd/MM/yyyy", System.Globalization.CultureInfo.InvariantCulture); DateTime EndDate1 = DateTime.ParseExact(tbEnddate.Text, "dd/MM/yyyy", System.Globalization.CultureInfo.InvariantCulture); DateTime leavesRemaining1 = EndDate1.Subtract(StartDate1);

New Topic/Question
Reply



MultiQuote





|