Compare current time with two times-of-day strings [closed]
How can i get time like "11:30" formate so that i want to compare it with the following: strOpenTime = @"10:00"; strCloseTime = @"2:00"; so how can i get current time like as above open/close time format and i want if the current time is inside the interval open/close time? Thanks in advance..!! First you have to convert the strings "10:00", "2:00" to a date from the current day . This can be done e.g. with the following method (error checking omitted for brevity): - (NSDate *)todaysDateFromString:(NSString *)time { // Split hour/minute into separate strings: NSArray *array = [time