title: IOS Swift. Time since date
body: <p>I want the number of months and days since a given date which is given by a string.</p>
  
  <p>d is a string of a date</p>
  
  <pre><code>    let dateFormatter = NSDateFormatter()
      dateFormatter.dateFormat = "MM-dd-yy"
      let date = dateFormatter.dateFromString(d)
      startTime = date?.timeIntervalSinceReferenceDate
  </code></pre>
  
  <p>I would ideally like the months,days,minutes since the date but I will work that part once I get passed this error. The compiler is complaining about the last line.</p>
  
  <p>Thanks</p>