Maybe somebody can help explain why I am getting a null value when converting a string to a date. It all looks right but I\'m obviously missing something here.
Some
I changed your date format to HH not hh and it works. Here is my test code....
NSDateFormatter *formatter = [[NSDateFormatter alloc] init];
[formatter setDateFormat:@"yyyy-MM-dd HH:mm:ss"]; // SQLite default date format
// test SQLite as String
NSString *testDate = @"2012-04-23 18:20:51";
NSDate *aDate = [formatter dateFromString:testDate];
NSLog(@"Using formmater on string date results in: %@", aDate);
NSDateFormatter
uses the format patterns from the Unicode Technical Standard #35.
For the hour format, you need HH
(Hour [0-23]) not hh
(Hour [1-12]).