Reputation: 12528
Is there any solution to create a NSFetchRequest in the XCode view which is returning all entities from "today"? In the view you can only specify a date but not dynamically define today.
I know that I can also create a NSFetchRequest directly in the code and there I can specify the date dynamically but I was just wondering if this is also possible directly in XCode without writing any code.
Upvotes: 0
Views: 119
Reputation: 80265
Yes it is possible. You can specify a variable $TODAY
and use it in code like so:
NSFetchRequest *fetchRequest = [self.managedObjectModel
fetchRequestFromTemplateWithName:@"ScanFetch"
substitutionVariables:@{@"TODAY":[NSDate date]}];
Upvotes: 2