I have this code that fills me in a datagrid with the hours every 15 minutes starting from 8 a.m.
How would I do if I want to generate the same hours but one more row per hour? ahem: in this case there would be two rows with 8 a.m. and two rows with 8:15 so on.
Private Horario4(52) As String
Private Sub LlenarHoras()
Dim minuto As Integer
Dim Horas As String = ""
Dim contador As Integer
For hora As Integer = 8 To 20
For minuto = 0 To 45 Step 15
If hora < 10 And minuto < 10 Then
Horas = "0" + hora.ToString() + ":" + "0" + minuto.ToString()
Else
If hora < 10 And minuto >= 10 Then
Horas = "0" + hora.ToString() + ":" + minuto.ToString()
Else
If hora >= 10 And minuto < 10 Then
Horas = "" + hora.ToString() + ":" + "0" + minuto.ToString()
Else
If hora >= 10 And minuto >= 10 Then
Horas = "" + hora.ToString() + ":" + minuto.ToString()
End If
End If
End If
End If
Horario4(contador) = Horas
contador = contador + 1
Next
Next
End Sub