title: how to add 30 mins for current time
body: <p>I am using VB.NET. I have a dropdownlist named <code>startTimeDDL</code>. Than I am using loop to enter in time inside that dropdownlist.</p>
  
  <pre><code>    ' Auto fill "Start Time"  for DropDownList
      Dim StartTime As DateTime = #12:00:00 AM#
      For i As Integer = 0 To 47
          StartTimeDDL.Items.Add(StartTime.ToString("hh:mm tt"))
          StartTime = DateAdd(DateInterval.Minute, 30, StartTime)
      Next
  </code></pre>
  
  <p>So look below and that will be inside the dropdownList. notie the format is hh:mm am/pm. </p>
  
  <p>12:00 AM<br>
  12:30 AM<br>
  01:00 AM<br>
  01:30 AM<br>
  02:00 AM
  ...<br>
  11:30 PM</p>
  
  <p><strong>Problem:</strong><br>
  lets say current time is 1:21:01 pm than I want to write code so it select 1:30 pm from dropdownlist. Now les take another example. les say current time is 12:00:00 AM than I was to select 12:30 AM from dropdownlist. les take one last example. les say current time is 2:10:12 AM than I want to  select 2:30 AM from the dropdownlist.</p>
  
  <p>here is the code I wrote so far. problem with it is that I am only selecting the current time. now can I modfily to do what I want?</p>
  
  <pre><code>    Dim dDate As DateTime = DateTime.Now.ToString("hh:mm tt")
      Dim temp As String = dDate
      StartTimeDDL.Items.FindByValue(temp).Selected = True
  </code></pre>