NSDateFormatter always return 2010-12-31 23:00:00 +0000

Posted by Janky on Stack Overflow See other posts from Stack Overflow or by Janky
Published on 2011-01-12T01:55:12Z Indexed on 2011/01/12 2:54 UTC
Read the original article Hit count: 210

Filed under:
|
|

Hello!

I'm using this code to format a date from a string:

NSDateFormatter *dateFormat = [[NSDateFormatter alloc]init];
[dateFormat setDateFormat:@"EEEE, dd MMMM yyyy"];

NSDate *dateStart = [dateFormat dateFromString:[thisEvent dateEvent]];

[thisEvent dateEvent] contains this date: Saturday, 09 April 2011

I don't know why dateStart contains 2010-12-31 23:00:00 +0000

where I'm wrong?

Thank You!!

© Stack Overflow or respective owner

Related posts about iphone

Related posts about nsdate