ios - How to ignore time in NSPredicate? -
There is a datetime field in my class called date_time In the lower loop I would like to find all the examples that have the same date That's where time will not be taken care of.
for (int day = 0; day & lt; days.length; day ++) {[Component set day: day]; NSPredicate * predicate = [NSPredicate predicateWithFormat: @ "date_time ==% @", [Cal date format: component]]; }
The above will not work though, because time also includes time in time. Is there a way to do this?
I think this will work for you:
[ Component set day: day]; NSDate * dateFromComponents = [cal dateFormat: components]; NSDT * Next Deedet = [NSDT date with timer: 24.0 * 60.0 * 60.0 Email: ડેટફોર્મ কম্পোনেন্টস]; NSPredicate * predicate = [NSPredicate predicateWithFormat: @ "date_time & gt; =% @ and & date_time
Comments
Post a Comment