I have to get a date from a string. So I am using the below code:
NSDateFormatter *formatter = [[NSDateFormatter alloc] init];
//Fri Mar 09 15:31:35 CST 2012
[formatter setDateFormat:@"EEE MMM d HH:mm:ss ZZZ yyyy"];
NSDate *date = [formatter dateFromString:[newDict objectForKey:@"eventDate"]];
NSLog(@"aDate is %@",[newDict objectForKey:@"eventDate"]);
eventDate is coming in the format aDate is Fri May 18 12:00:37 IST 2012 but date is coming null.
I know it is a small issue but I am really stuck up with it.