title: Swift : How to convert String to string with time format?
body: <p>I have string values include time with formatted <strong>&quot;HH:mm&quot;</strong> (16:50)</p>
  <p>i have to convert this value to <strong>&quot;hh:mm</strong>&quot; format (04:50) as a string in SWIFT</p>
  <p>i have tried NSDateFormatter like</p>
  <pre><code>let timeFormat = NSDateFormatter()
  timeFormat.dateFormat = &quot;hh:mm&quot;
  var dateFromStr = timeFormat.dateFromString(&quot;16:50&quot;)
  var strFromDate = timeFormat.stringFromDate(dateFromStr)
  </code></pre>
  <p>but its not working..
  Please tell any solution.</p>