Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

XcodeNewb

macrumors member
Original poster
Feb 6, 2009
79
0
I would like to compare two dates stored in NSStrings to see if the first date is earlier than the second. I have researched the earlierDate method in NSDate but I am not quite sure how to implent it and how to get the result as a bool ( true/false).

Any help would be appreciated. Thanks

NSString *date1;
NSString *date2;

date1 holds "11/11/2008" and date2 holds "11/12/2008"

Is there any if statement I can do?

if (date1 isEarlierThan(date2))
{
return true;
}

This is just an example of course. Thanks
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.