Mike,

If you are using iOS, then presumably you are using the NSDate class. If you 
are, then the easiest thing to do is store the result of 
- (NSTimeInterval)timeIntervalSinceReferenceDate . This stored value can be 
turned back into an NSDate using [NSDate 
dateWithTimeIntervalSinceReferenceDate:]

The type of NSTimeInterval is a double. This can be stored easily and has good 
precision (see 
http://developer.apple.com/mac/library/documentation/Cocoa/Reference/Foundation/Miscellaneous/Foundation_DataTypes/Reference/reference.html#//apple_ref/c/tdef/NSTimeInterval
 )

Any further discussion along these lines would probably be better taken to a 
mac development list such as cocoa-dev.





On 4 Sep 2010, at 12:31, Mike Zang wrote:

> I try to convert data to SQLite3 for iPad, please give me some detail
> suggestion.
> 
> I think that I can save date value as below to SQLite3, I want to know
> which is better, or anything else if you have good idea.
> 
> 1. integer as seconds since 1970
> 2. integer as days since 1970
> 3. string as '2010-09-03'
> 4. string as '10-09-03'
> 

_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to