Q:

How to store login and logout time in SQLite DB get it back? 

i have to store the login and logout time in my SQLite DB and get it back in my app view that how much time user had locked after his logout from the session.  if any one have any idea about this can you please help me guys. 

A:

Here is the simple code to store value in DB:
public  void addLogin(String Name){
         SQLiteDatabase db = this.getWritableDatabase();
         ContentValues values = new ContentValues();
         values.put(NAME,Name);
         values.put(TIME,time); 
         db.insert(STORE,null,  values);
         db.close(); 
     }

follow this link it will be very much useful:http://hmkcode.com/android-simple-sqlite-database-tutorial/

