I only want date like "29-10-2014" with no time so i did this
NSDateFormatter *df = [[NSDateFormatter alloc]init];
[df setDateFormat:@"dd-MM-yyyy"];
NSString *sDate = [df stringFromDate:date];
If I log the sDate
I am getting perfect result. But I dont want NSString
I want date object, to do that here what I did is
NSDate *theDate = [df dateFromString:sDate];
Now I am getting 2014-10-29 19:00:00 +0000
I only want 29-10-2014
.