views:

49

answers:

1

I use Core Data and I want to store this formatted date to db, field type is date, how can I do this?

date formatted: 2010-10-31

I hope I explained my scenario. Sorry for my English. Greetings.

+1  A: 

The real question here is why you would want to do this. It is best to store the NSDate as an NSDate, then apply any view changes you need on the fly with NSDateFormatter.

However, so I can get some Rep Points, I will answer the question. You can store the pre-formatted date as an NSString, not an NSDate.

coneybeare