Dear All,
I'm little bit confused about my code i.e. I want to display the message if the time is less than 8:00 AM in the morning and if the time is greater than 17:00 (PM) it should display message no meeting to display else the time is between 8:00-17:00 different message.
TimeSpan start = TimeSpan.Parse("08:00"); // 10 PM
TimeSpan end = TimeSpan.Parse("16:30"); // 2 AM
TimeSpan now = DateTime.Now.TimeOfDay;
string timespan= now.ToString(@"hh\:mm");
if (now <= start && now >= end)
{
lbl_availabletime.Text = "No more upcoming appointemtns for the day";
}
else
{
lbl_availabletime.Text = "Available until " + currentdate1.ToString();
}
Thanks