So this sounds like it should be so simple, yet for me, this code block returns a nil date:
NSDateFormatter *df = [[NSDateFormatter alloc] init];
[df setDateFormat:@"yyyy-MM-dd hh:mm:ss"];
NSDate *newStartDate = [df dateFromString:@"2012-05-11 20:45:00"];
Does anyone have any idea what could be causing newStartDate to be returned as nil? df is valid, the format string appears to be valid. I’m completely stuck here, so any advice would be great!
Thanks!
change
hhtoHH.hhis for 1-12 with AM/PMHHis for 0-23.