Re: [android-developers] How to store date and time in database

2010-12-28 Thread Nandlal Viranni
On Mon, Dec 27, 2010 at 11:51 AM, pramod.deore deore.pramo...@gmail.comwrote: Hi everyone, In my application I have 2 buttons one for DatePickerand one for Timepicker. Date piker gives me date in this format - 12-27-2010 and time in - 11:48. Now I want to create table to store

[android-developers] How to store date and time in database

2010-12-26 Thread pramod.deore
Hi everyone, In my application I have 2 buttons one for DatePickerand one for Timepicker. Date piker gives me date in this format - 12-27-2010 and time in - 11:48. Now I want to create table to store these values. How to store date and time in android database? Thanks. -- You

Re: [android-developers] How to store date and time in database

2010-12-26 Thread Kristopher Micinski
http://sberka.blogspot.com/2009/07/date-time-sqlite-and-android.html That blog post should point you in the right direction. What you may really want to know is how SQLite handles date and time. From what I've encountered there is no native date/time handling in SQLite, but you can simply store

Re: [android-developers] How to store date and time in database

2010-12-26 Thread Kostya Vasilyev
Kris Pramod, With all due respect, there is a much easier way. Java date/time stamps are internally represented by long values, the value being the number of milliseconds since Jan. 1, 1970 GMT. SQLite natively supports long (64-bit) interger values (use INTEGER data type). So, for