Why that if condition, comparing two datetime, doens’t work?
If they need to be NSDate, how can I convert them?
Code:
if ([[NSDate date] dateStringFromFormat:@"dd/MM/yyyy HH:mm"] > [self.tfDatetime dateStringFromFormat:@"dd/MM/yyyy HH:mm"]) {
// Do ...something
}
To compare two NSDates(say, dateOne and dateTwo), use this