I have NSDate variable and would like to change only time (date shouldn\'t be changed). Is it possible ?
Eg: user pick date interval in DatePicker date (If it\'s start d
The NSDate object cannot be changed.
NSDate
You can create a new NSDate object from it. Take a look at the - (id)dateByAddingTimeInterval:(NSTimeInterval)seconds method.
- (id)dateByAddingTimeInterval:(NSTimeInterval)seconds
NSDate *newDate = [endDate dateByAddingTimeInterval:24.0f * 60.0f * 60.0f - 1.0f];