Reputation: 1226
I am converting an NSString like @"12:25 AM May 27 2011" into NSDate.But as I convert it using the following code
NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];
[dateFormatter setDateFormat:@"hh:mm a MMM dd YYYY"];
NSDate *date = [[dateFormatter dateFromString:@"12:25 AM May 27 2011"] copy];
[dateFormatter release];
I get the wrong Date as 2010-12-25 19:25:00 +0000
Can anyone please help me around here
Upvotes: 0
Views: 115