Register FAQ / Rules Forum Spy Search Today's Posts Mark Forums Read
Go Back   MacRumors Forums > Apple Systems and Services > Programming > iPhone/iPad Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old Oct 19, 2011, 02:10 AM   #1
willemVP
macrumors newbie
 
Join Date: Aug 2011
Core Data, get records by date, regardless the time

I have a project that uses RestKit & Core Data to manage my data.
What I'm trying to do is to get all the records for a specified date regardless the time. I have a Data attribute in Core Data which has dates stored like 2011-11-14 13:30:00. I don't care about the time for now, I only want the records with the same date as 2011-11-14.

How do I do this?
willemVP is offline   0 Reply With Quote
Old Oct 19, 2011, 03:23 AM   #2
amorya
macrumors regular
 
Join Date: Jun 2007
Quote:
Originally Posted by willemVP View Post
I have a project that uses RestKit & Core Data to manage my data.
What I'm trying to do is to get all the records for a specified date regardless the time. I have a Data attribute in Core Data which has dates stored like 2011-11-14 13:30:00. I don't care about the time for now, I only want the records with the same date as 2011-11-14.

How do I do this?
Date >= 2011-11-14 00:00 && Date < 2011-11-15 00:00
amorya is offline   0 Reply With Quote
Old Oct 19, 2011, 03:27 AM   #3
willemVP
Thread Starter
macrumors newbie
 
Join Date: Aug 2011
That's how I fixed for now. But isn't there an easier way like: day(myDate) == day(myCompareDate)?
willemVP is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > iPhone/iPad Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
thread Thread Starter Forum Replies Last Post
core data binding not working Javajax Mac Programming 3 Jul 10, 2011 01:23 PM
Reading Date from database in Ipad ashwinr87 iPhone/iPad Programming 0 Apr 25, 2011 11:11 AM
How do I count the number of child entities with a specific value? Mr Skills iPhone/iPad Programming 2 Apr 8, 2011 03:49 PM
Help Needed - Xcode 4 Options: Use Core Data Include Unit Tests Mitch1984 iPhone/iPad Programming 3 Feb 26, 2011 03:42 PM
Core data, reacting to a change in the interface Chirone Mac Programming 0 May 25, 2009 05:02 PM


All times are GMT -5. The time now is 02:10 AM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

Privacy / DMCA contact / Affiliate and FTC Disclosure
Copyright 2002-2013, MacRumors.com, LLC