title: What datatype should I save for hh:mm tt in SQL Server
body: <p>I have a web form that has a dropdownlist with hh:mm tt with 30 minutes interval, starting from 6:00am, 6:30 am, 7:00am....8:00pm. How can I save selected time into SQL Server? I am not sure what datatype (<code>Date</code>, <code>DateTime</code>, <code>Time(7)</code>) in SQL Server I should use. </p>
  
  <p>Please help me advise.  </p>
  
  <p>This is my C# code to load </p>
  
  <pre><code>protected void Page_Load(object sender, EventArgs e)
  {
      AddDropDownValues(ref ddlHrMin, 6, 20, 30);
  }
  </code></pre>
  
  <p>This is how I defined to come out as this hh:mm tt</p>
  
  <pre><code> private void AddDropDownValues(ref DropDownList ddlHrMin, int startHour, int endHour, int increment)
  {
      DateTime now = DateTime.Now;
      DateTime startTime = new DateTime(now.Year, now.Month, now.Day, startHour, 0, 0);
      DateTime endTime = new DateTime(now.Year, now.Month, now.Day, endHour, 0, 0);
  
      while (startTime &lt;= endTime)
      {
          ddlHrMin.Items.Add(startTime.ToShortTimeString());
          startTime = startTime.AddMinutes(increment);
      }
  }
  </code></pre>