I have a string like "20121124T103000" and I want to convert this to NSDate.
I tried converting it with dateFormatter date format "yyyyMMddThhmmss" but it gives output as 2001-01-01 00:00:00 +0000 which is incorrect.
What is the way we can convert this string to NSDate?
Here is my code:
NSDateFormatter *dateFormat = [[NSDateFormatter alloc] init];
[dateFormat setDateFormat:@"yyyyMMddThhmmss"];
NSLog(@"%@",[dateFormat dateFromString:@"20121124T103000"]);
Any help is appreciated.