title: Convert a format string to timestamp in Swift
body: <p>Before asking this question I have searched stack overflow but found some other language's answer. I did not find a post with Swift.</p>
  
  <p>I have the string <code>2016-12</code>,the <code>time</code> is <code>2016-12-01 00:00:00</code>. I want to convert to a <code>timestamp</code>, since <code>1970</code> using <code>Greenwich Mean Time</code>.</p>
  
  <p>2016-12 → 1480521600.</p>
  
  <p>2016-12 is a string formatted as year-month. I want to convert it to a timestamp</p>
  
  <p>How can I convert it in Swift?</p>