• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Default value for Date Atttribute in Core Data application
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Default value for Date Atttribute in Core Data application


  • Subject: Re: Default value for Date Atttribute in Core Data application
  • From: Bill Coleman <email@hidden>
  • Date: Sat, 12 Aug 2006 20:21:48 -0400


On Aug 10, 2006, at 9:18 AM, Lee Gillen wrote:

I have a Core Data application that has a date attribute for one of
the entities. I'd like to set the default value for this attribute to
be the current date and time that the data was created. I found that I
can use a default value of 'now' or 'today' and it will populate the
attribute with the date the data was created, but not the time.

I couldn't do this with a default value -- ran into the same problem, "TODAY" produces a time of 12 noon.


What I did was set the time to [NSDate date] in code after creating the object.

Bill Coleman, AA4LR, PP-ASEL        Mail: email@hidden
Quote: "We invented personal computing."
            -- Bill Gates @ TechNet / MSDN 2003


_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
  • Follow-Ups:
    • Re: Solved: Default value for Date Atttribute in Core Data application
      • From: Lee Gillen <email@hidden>
References: 
 >Default value for Date Atttribute in Core Data application (From: "Lee Gillen" <email@hidden>)

  • Prev by Date: Re: core data design pattern with different model transformations?
  • Next by Date: Converting strings to html safe
  • Previous by thread: Re: Default value for Date Atttribute in Core Data application
  • Next by thread: Re: Solved: Default value for Date Atttribute in Core Data application
  • Index(es):
    • Date
    • Thread