NSDate *date=[[NSDate alloc] init];
NSDateFormatter *dfLocal=[[NSDateFormatter alloc]init];
[dfLocal setDateFormat:@"yyyy-MM-dd"];
date=[dfLocal dateFromString:@"2011-09-22"];
NSLog(@"the date is %@",date);
this is my code and gives the output as..
2012-04-02 18:13:45.338 TimeProblem[2656:207] the date is 2011-09-21 18:30:00 +0000
why is it appending this.. 18:30:00 +0000 to the end..? I just want it to be as 00:00:00 +0000
Use below: