I know how to compare dates.In my case, let Date1 = 2011-10-14 & Date2 =2011-10-20 .And I want to check if 15th Oct lie between Date1 and Date2.I’m using following codes for this:
if ( [date compare:Date1] == NSOrderedDescending && [date compare:Date2] == NSOrderedAscending) {
//write codes
}
But this will not check if 15th oct lie between 14th and 20th Oct.rather it check for whole date. So, How will I implement this.
Thnx in advance.
I hope the following code would help you. Assuming Date1 and Date2 you have,