Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

jliu69

macrumors newbie
Original poster
Jun 23, 2009
1
0
Hi,

I'm new to the core data with the iphone cocoa program. In my application I need to use core data with predicate to query the SQLite database.

It has a date field with the data type as TimeStamp. I try to use the SQLite function datetime(), as :

datetime(arrive_time) < datetime('2009-06-23 11:30:00')

but it has the compilation error. And when I used the datetime() function in one side, like :

arrive_time < datetime('2009-06-23 11:30:00')

Can I use the NSDate object to pass into the predicate format string directly and do the comparison?

Thanks much,

jliu69
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.