title: how to format a string in linq
body: <p>im having problem with my string of time.. i wanted to format it so that it will display a more neat design.. can anyone help me with this one </p>
  
  <p>here's my code:</p>
  
  <pre><code> ViewBag.startTime = 
   (from a in test
    where a.ID == clientCustomerPositionShiftnfo.ID
    select new{ a.StartTime})
    .AsEnumerable()
    .Select(a =&gt; a.StartTime != "Anytime"
    ? Convert.ToDateTime(a.StartTime).ToString("HH:mm:ss")
    : a.StartTime.Trim());
  </code></pre>
  
  <p>In my view:</p>
  
  <pre><code>    &lt;input type="text" id="txtStartTime" name="txtStartTime" class="inputLong"
  value="@ViewBag.startTime" disabled="disabled"/&gt;
  </code></pre>