Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

erdinc27

macrumors regular
Original poster
Jul 20, 2011
168
1
i have such a string "17:22:19" i need to convert it to time and countdown. I try to format it with NSDateFormatter but the result is always nil. Here how my code looks.
Code:
NSDateFormatter *formatter = [[NSDateFormatter alloc] init];
formatter.dateFormat = @"HH:mm:ss";
NSDate *theTime = [formatter dateFromString:@"17:22:19"];

how can i convert it to time and countdown by timer ?
 
Thank you for reply. I think i formatted it correctly but i made a mistake when i try to log the date. So i found it out.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.