title: NSDate/NSDateFormatter - Storing only time, not date?
body: <p>I've been looking around but I haven't seen anything that addresses this so I'm hoping someone can help clear this up for me. What I am trying to do is use an NSDate variable(in core data) to store a time, not date and time, but just time in the format HH:MM:SS; </p>
  
  <p>After looking at the NSDateFormatter class reference and the sample code provided I was able to tweak it and think that my code should look something like the following:</p>
  
  <pre><code>NSDateFormatter *timeOfArrival = [[NSDateFormatter alloc] init];
  [timeOfArrival setTimeStyle:NSDateFormatterLongStyle];
  [timeOfArrival setDateStyle:NSDateFormatterNoStyle];
  [timeOfArrival setLocale:[[[NSLocale alloc] initWithLocaleIdentifier:@"en_US"] autorelease]];
  
  NSString *etaStr = [attributeDict objectForKey:@"cumulativeTime"];
  NSLog(@"%@", etaStr);
  checkpoint.eta = [timeOfArrival dateFromString:etaStr];
  </code></pre>
  
  <p>Everything up until the last line where I try to create my NSDate object from my string works, but after that, checkpoint.eta is still nil.</p>
  
  <p>etaStr correctly outputs my expected value, 00:14:00, for example, but I'm not sure what I'm doing wrong.</p>