How to get the date without Time from NSDate?
nsdate, objective-c
Solution
In case someone else looks for this. I used the following:
NSDateComponents *components = [[NSCalendar currentCalendar]
components:NSYearCalendarUnit|NSMonthCalendarUnit|NSDayCalendarUnit
fromDate:[NSDate date]];
NSDate *startDate = [[NSCalendar currentCalendar]
dateFromComponents:components];
Problem
I want to get the date from `NSDate` and do not need time. Example: ``` NSDate* today = [NSDate date]; // want to give 20-06-2012 only ``` I want to get the date for today without showing the time and use it in `NSDate` variable or string variable.