title: Swift: Cannot convert value of type 'NSDate' to expected argument type 'NSDateComponents'
body: <p>Anyone know how i can solve this? I get this error: </p>
  
  <blockquote>
    <p>¨cannot convert value of type 'NSDate' to expected argument type 'NSDateComponents'¨ on line: </p>
  </blockquote>
  
  <p>The error occurred at the line:</p>
  
  <pre><code>let competitionDay = userCalendar.dateFromComponents(competitionDate)!
  </code></pre>
  
  <p>This is a more complete excerpt of the code:</p>
  
  <pre><code>func Date() {               
  
      // Here we set the current date
  
      let date = NSDate()
      let calendar = NSCalendar.currentCalendar()
      let components = calendar.components([.Hour, .Minute, .Second, .Nanosecond], fromDate: date)
      let hour = components.hour
      let minutes = components.minute
      let month = components.month
      let year = components.year
      let day = components.day
  
  
      let currentDate = calendar.dateFromComponents(components)
  
  
  
      // here we set the due date. When the timer is supposed to finish
      // final Calendar value
  
          let userCalendar = NSCalendar.currentCalendar()
  
  
          let competitionDate:NSDate = myDatePicker.date
  
  
          competitionDate.timeIntervalSinceNow
  
  
          let competitionDay = userCalendar.dateFromComponents(competitionDate)!
  
  
      // Here we compare the two dates
      competitionDay.timeIntervalSinceDate(currentDate!)
  
  
      let dayCalendarUnit = calendar.components([NSCalendarUnit.Day, NSCalendarUnit.Hour, NSCalendarUnit.Minute], fromDate: date)
  
  
      //here we change the seconds to hours,minutes and days
  
  
      let competitionDayDifference = calendar.components([.Day, .Hour, .Minute],
              fromDate: currentDate!, toDate: competitionDay, options: NSCalendarOptions())
  
      //finally, here we set the variable to our remaining time
      let daysLeft = competitionDayDifference.day
      let hoursLeft = competitionDayDifference.hour
      let minutesLeft = competitionDayDifference.minute
  </code></pre>