I have time in string format for example 2:00. I want to initialize it to NSDate with present date.
I tried doing
NSDateComponents *comps = [[NSDateComponents alloc] init];
[comps setHour:2];
I am not able to compare this with a date object. Please help
Try
You should be able to compare with date after that.
Maybe you mean something like. I think will set using today’s date and then you can create NSDateComponents from that and set time values.