Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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];
- NSDateFormatter *formatter = [[NSDateFormatter alloc] init];
- [formatter setLocale:[[[NSLocale alloc] initWithLocaleIdentifier:@"en_US"] autorelease]];
- [formatter setDateFormat:@"HH:mm:ss"];
- NSString *etaStr = @"00:14:00";
- NSLog(@"%@", [formatter stringFromDate:[formatter dateFromString:etaStr]]);
- [formatter release];
- 00:14:00
Add Comment
Please, Sign In to add comment