I have the following code to parse a date from string:
NSString * str = @"8/13/2010 1:59:00 PM";
NSDateFormatter * dateFormat2 = [[NSDateFormatter alloc] init];
[dateFormat2 setDateFormat:@"MM/dd/yyyy h:mm:ss a"];
NSDate * orderDate = [dateFormat2 dateFromString:str ];
but orderDate is always coming up null, what am i doing wrong ? What is the proper dateFormatString ?
This works fine in the emulator but is null on iphone 4 ios 4.0