Definitely #1 if iOS supports 64-bit unix timestamps. You also store the time of the day, which may prove useful later on.
#2 is non-standard. No time value. #3 has no time value. '2010-09-03T01:23:45' (ISO 8601) would be an option though. #4 gives room for mistakes; the year may be interpreted as the day. > Date: Sat, 4 Sep 2010 20:31:00 +0900 > From: mikez...@yahoo.co.jp > To: sqlite-users@sqlite.org > Subject: [sqlite] Which data type is better for date? > > 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 _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users