My dateFromString is not working and i’m not sure why
NSString *purchase = @"2011-09-30 17:47:57";
NSDateFormatter *dateFormat = [[NSDateFormatter alloc] init];
[dateFormat setDateFormat:@"yyyy-MM-dd hh:mm:ss"];
NSDate *date = [dateFormat dateFromString:purchase];
date is ‘invalid CFStringRef’
See anything i might be overlooking?
in the format
“hh” means Hour [1-12].
“HH” means Hour [0-23].
See UTS Date Field Symbol Table for the date format specifiers.