To debug a DB app I need to verify the datevalue against the value that arrives in my SQLiteDB. Is there a way to show the double(?)-value of an NSDate (in code covert it to a double?)
A:
Apparently solution depends on what value is stored in your database.
Have a look at -timeIntervalSince1970
method - it may do for you as timeintervals are often used for storing date values in db.
Vladimir
2010-04-20 15:06:27
Hi Vladimir, I am looking for the reverse direction. I need to debug the NSDate value as double before it is inserted into the DB ?
iFloh
2010-04-20 15:08:58
So use timeIntervalSince1970 method - it will return the number of seconds passed since 01.01.1970. What other double value you expect to get from NSDate?
Vladimir
2010-04-20 15:14:56
Now I got ya, too right, thanks
iFloh
2010-04-21 07:00:17