开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜