How to store short date format to db?
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.
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.
精彩评论