I am looking to find the difference in days of two ajax calendar extenders that are linked to two separate text boxes.
Dim dt1 As DateTime = Convert.ToDateTime(CalendarExtender1.SelectedDate)
Dim dt2 As DateTime = Convert.ToDateTime(CalendarExtender2.SelectedDate)
Dim diffInDays As Integer = dt2.Subtract(dt1).Days
Label12.text = "The dates are " + diffInDays.ToString() + "days appart."
I have completed this task using the asp calendar control previously but I am having issues when trying to achieve this using the ajax calendar extension.
the label output is stating " the two dates are 0 days apart " for numerous tested dates.
I would appreciate if anyone could give any guidance/help or let me know where i am going wrong.
Thanks!