Dim d As Date = "3:48" Dim m As Integer = 0 If d.Minute >= 20 AndAlso d.Minute < 45 Then d = new Date(d.Year, d.Month, d.Day, d.Hour, 30, 0) ElseIf d.Minute < 20 Then
ElseIf d.Minute >= 45 Then d = new Date(d.Year, d.Month, d.Day, d.Hour, 0, 0).AddHours(1) End If