Hello Senshan, It is easy, just define your column as a DATE type on "create table" script. (i.e. create table foo (_id INTEGER primary key autoincrement, mydate DATE);) You put the key and the value pairs into ContentValues.(i.e. new ContentValues().put("mydate", "your-date-goes-here");) . Use String version not the Date type directly.
SqlLite does not understand all types of date by default, for more information on date conversion for SqlLite please follow the link. http://sacoskun.blogspot.com/2008/05/sqlite-datetime-insertion.html Hope this helps, sacoskun On Jul 8, 8:09 pm, Billsen <[EMAIL PROTECTED]> wrote: > Hi, > > How to save data with timestamp data type into SQLite database. The > method put in class ContentValues does not accept date data type. > > Thanks, > Senshan --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] Announcing the new M5 SDK! http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---