Displaying number of days in label
i have two calender and two dropdownlist. i want to check number of days.needs of dropdownlist is checking halfday or fullday.
halfday is 0.5 and full day is 1
i want to use the conditions....like if ....
where?
coding:
DateTime FromYear = Convert.ToDateTime(calfrom.SelectedDate);
DateTime ToYear = Convert.ToDateTime(calto.SelectedDate);
TimeSpan objTimeSpan = ToYear - FromYear;
double Days = Convert.ToDouble(objTimeSpan.TotalDays );
Label1.Text = Convert.ToString(Days);