NSDateFormatter
Posted
by srushti
on Stack Overflow
See other posts from Stack Overflow
or by srushti
Published on 2010-03-08T08:30:44Z
Indexed on
2010/03/08
8:36 UTC
Read the original article
Hit count: 333
objective-c
my code is like this
NSString *tempDate = [NSString stringWithString:tempReviewData.pubDate];
NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init]; [dateFormatter setDateStyle:NSDateFormatterLongStyle]; [dateFormatter setTimeStyle:NSDateFormatterNoStyle]; [dateFormatter setDateFormat:@"HH:mm a"];
NSDate *newDate = [dateFormatter dateFromString:tempReviewData.pubDate];
My newDate is getting nil at this point i dont know why
© Stack Overflow or respective owner