views:

426

answers:

1

I am new to core data and before I was using sqlite.

I found SQLite is not efficient and since my application is using extensive database communication, I have to compile the statements. With all this running my application breaks giving memory warnings, sometimes its views sometimes gets blank in between. Is it because of using SQLite only? Because there are no memory leaks as well as application works perfectly fine on simulator.

I decided to shift to Core Data. Now I need to convert all the queries which I was using in sqlite for core data using predicate and sortDescriptors. I want to know how to create predicate for something as follows:

Select * From activities where date(datetime(dateandtime,?)) = date(STRFTIME('%J',?))";

How to find something from table with respect to some date which will be selected by user in datePicker.

+3  A: 

Consider reading the Predicate Programming Guide, where you can find out how to filter based on various criteria, including dates.

Alex Reynolds