On the db side checkInTimeand checkOutTimeare of typeTIMESTAMP
In my java-code well checkInTimeand checkOutTimeare of the typejava.sql.Timestamp
To insert an entry in db, I use this piece of code:
1. ContentValues contentValues=new ContentValues();
2. contentValues.put(USER_ID, userId);
3. contentValues.put(ROOM_ID, roomId);
4. contentValues.put(CHECK_IN, checkInTime);
5. contentValues.put(CHECK_OUT, checkOutTime);
6. return database.insert(MRM_BOOKING_DETAILS_TABLE, null, contentValues);
But I get compilation errors in lines 4 and 5, since they do not expect something like java.sql.Timestamp
I do not see any put method from C ontentValuesthat will accept a type java.sql.Timestampin the second parameter. Please suggest how to pass java.sql.Timestampin such a case so that I can also remove compilation errors.
Thank,
source
share