title: Conversion of NSString to NSDate in swift
body: <p>I am trying to convert @"4:30 PM" (string) to NSDate format. I am unable to do this and I am getting unexpected out put.</p>
  
  <p>My code</p>
  
  <pre><code>var strDate = "4:30 PM"
  let dateFormatter = NSDateFormatter()
  dateFormatter.dateFormat = "h:mm a"
  let date = dateFormatter.dateFromString(strDate)
  print(date)
  </code></pre>
  
  <p>OutPut : Optional(2000-01-01 11:00:00 +0000)</p>