Erc*_*can 7 date core-data nspredicate
在我的模型中,我有日期属性,我设置它[NSDate date],但得到谓词之类的
NSPredicate *predicate = [NSPredicate predicateWithFormat:
@"date==%@ ,date];
Run Code Online (Sandbox Code Playgroud)
回来了.我知道问题是当我设置[NSDate date]它时 也存储时间和NSPredicate总是返回空数据.有没有办法将"date==%@"部分转换为仅查找日期?
can*_*ian 19
NSPredicate *predicate = [NSPredicate predicateWithFormat:@"(date >= %@) AND (date <= %@)", startDate, endDate];
Run Code Online (Sandbox Code Playgroud)