R
R
Rostislav2014-11-17 16:19:28
Swift
Rostislav, 2014-11-17 16:19:28

How to write a Date in Core Data ios in the correct format?

How correctly to write down current date in Core Data?
I did this
newUser.setValue(NSDate(), forKey: "date")
In the database itself, the following parameters are selected
d0b5dbafaf0b4768903ca48e9af6831d.png
After installing the application on an ios device, I make a couple of entries and pull out the .xcdatamodeld file, open it with the sqlitebrowser program and see the following
In the column, you can see not the date, but a set of numbers
bbbd6bddfd814932b27137eec779d03a.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Denis Morozov, 2014-11-17
@morozovdenis

CoreData is so more convenient to store the date, when you pull out the object, you should get the correct result.
What do you want to do with the file? What problem/problem are you solving?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question