Problem with NSDateformatter

Posted by Nithin on Stack Overflow See other posts from Stack Overflow or by Nithin
Published on 2010-03-26T11:19:28Z Indexed on 2010/03/26 11:23 UTC
Read the original article Hit count: 649

Filed under:
|
|

Hi all, i've seen many questions on NSDateformatter and NSDate, but none could help me out.

[formatter setDateFormat:@"yyyy/mm/dd"];
        NSDate *date = [formatter dateFromString:@"2010/03/10"];
        if (date) {
            NSLog(@"Date returned:::%@",date);
            return date;
        }

The Probelm is that, its returning the date --- '2010-01-10 00:03:00 +0600' The month is changed to 1 and the minute to 3, What might be the problem???

© Stack Overflow or respective owner

Related posts about iphone

Related posts about nsdate