Hello All,
I have 3 combo boxes on my form
1. Doctor Start Time
2. Doctor End Time
3. Doctor Appointment Duration
I want a 4th combo Box that will Start from Doctor's Start Time upto Doctor's End Time with the interval of Appointment Duration
eg. Suppose the Start time is 08:00 and End Time 10:00 with 24 hr clock
the appointment duration is 30 mins
then the 4th comboBox should Display
08:00
08:30
09:00
09:30
Can anyone help me in this
I have done this coding on the basis of Appointment Duration
Dim da As DateTime = FormatDateTime("00:00")
cboAppTime.Items.Clear()
If txtDuration.Text = "15" Then
For xa As Integer = 0 To 95
cboAppTime.Items.Add(FormatDateTime(da.TimeOfDay.ToString, DateFormat.ShortTime))
da = da.AddMinutes(15)
Next
ElseIf txtDuration.Text = "30" Then
For xa As Integer = 0 To 47
cboAppTime.Items.Add(FormatDateTime(da.TimeOfDay.ToString, DateFormat.ShortTime))
da = da.AddMinutes(30)
Next
ElseIf txtDuration.Text = "45" Then
For xa As Integer = 0 To 31
cboAppTime.Items.Add(FormatDateTime(da.TimeOfDay.ToString, DateFormat.ShortTime))
da = da.AddMinutes(45)
Next
ElseIf txtDuration.Text = "60" Then
For xa As Integer = 0 To 23
cboAppTime.Items.Add(FormatDateTime(da.TimeOfDay.ToString, DateFormat.ShortTime))
da = da.AddMinutes(60)
Next
End If
The above coding shows time from 00:00 to 23:00
Need to proceed further with ur help.