This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NSExpressionDescription *dateDescription = [[NSExpressionDescription alloc] init]; | |
[dateDescription setName:@"date"]; | |
[dateDescription setExpression:[NSExpression expressionForKeyPath:@"someKeyPath.date"]]; | |
[dateDescription setExpressionResultType:NSDateAttributeType]; | |
NSPropertyDescription *propertyDescription = [[fetchRequest.entity propertiesByName] objectForKey:@"propertyName"]; | |
[fetchRequest setResultType:NSDictionaryResultType]; | |
[fetchRequest setPropertiesToFetch:@[dateDescription, propertyDescription]]; |