Convert NSString to NSDate [duplicate]
Possible Duplicate: Converting NSString to NSDate (and back again) I make a request to the flickr api and it returns me the date in the following format "2013-02-01T06:25:47Z" How do i convert this into NSDate format?? Madhu It's a simple one, converting NSString to NSDate we use NSDateformatter using dateFromString method. We need to provide the Dateformatter style with existing style for NSString NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init]; [dateFormatter setDateFormat:@"yyyy-MM-dd'T'HH:mm:ssZ"]; NSDate *date = [dateFormatter dateFromString:@"2013-02-01T06:25:47Z"];