title: Passing date from controller to html time
body: <p>I am trying to pass date from a controller to a razor view input time element but its not populating the element with hour min and am/pm. In dev tools, I get</p>
  <p>The specified value <code>12/16/2021 12:30:00 AM</code> does not conform to the required format.  The format is <code>HH:mm</code>, <code>HH:mm:ss</code> or <code>HH:mm:ss.SSS</code> where HH is 00-23, mm is 00-59, ss is 00-59, and SSS is 000-999.</p>
  <p>Can you please tell me what do I need to do to change the format?</p>
  <pre><code> @Html.TextBoxFor(model =&gt; model.StartTime, new { @class = &quot;form-control&quot;, type=&quot;time&quot; }) 
  </code></pre>
  <p><a href="https://i.stack.imgur.com/091G5.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/091G5.png" alt="enter image description here" /></a></p>