0

I am trying to create @FetchRequest to get list of items which name contains “bill” and transaction dates are >= “2023-01-29” and transaction dates are =< “2023-08-29” using following @Fetchrequest but nothing being displayed in the view. It seems that NSpredicate transaction date logics are incorrect.


@FetchRequest(sortDescriptors: [], predicate: NSPredicate(format: "(name CONTAINS[cd] 'bill') AND (transactionDate >= 2023-01-29) AND (transactionDate =< 2023-08-29)")) var lists: FetchedResults<Expense>

For the reference the name is String type and transactionDate is Date type.

Appreciate your helps.Thanks

mzkn
  • 39
  • 6

0 Answers0