I know there are a lot of answers about that problem, but I need someone explain me easy, why on SDK 3.1.3 the code bellow returns the correct result, and in the same code in IOS4 return nil.
Thanks a lot for any suggestion.
Marcello
NSDateFormatter *dateFormatter = [[NSDateFormatter alloc]init];
[dateFormatter setDateFormat:@"yyyy-MM-dd HH:mm:ss"];
NSDate *testOut = [dateFormatter dateFromString:[itemAtIndex objectForKey:@"data"]];
NSDateFormatter *df = [[NSDateFormatter alloc] init];
df.dateStyle = NSDateFormatterShortStyle;
NSString *pippo = [NSString stringWithFormat:@"%@ >",[df stringFromDate:testOut]];
5/6/2010
Hi, I tried to solve with this code by following your information:
NSString *myDate = [NSDateFormatter localizedStringFromDate:[itemAtIndex objectForKey:@"data"] dateStyle:NSDateFormatterMediumStyle timeStyle:NSDateFormatterShortStyle NS_AVAILABLE(10_6, 4_0)];
but I get only invalid CFStringRef...
It is just a little bit frustrating Have you any suggestion.. Thanks for your time.. Marcello