views:

34

answers:

1

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
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
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
Now I got ya, too right, thanks
iFloh