I have a unix date in long format
Long tmpLong = (Long) local.getValue();
Here is the value of tmpLong
1485710457166
Now I want to store this variable inside of my SQLite DB, after some research I found out that you cant store Longs in SQLite so I tried this:
Long tmpLong = (Long) local.getValue();
Integer tmpInt = tmpLong.intValue();
But this gives me:
-348227250
In SQLite my datatype is INTEGER
I need help storing this unix number, any help is appreciated
Update 1
If I try store it as a long, so
localDB.add(image_id, unixTimestamp, PATH);
And then in my add method (inside SQLiteHelper class). I print the value for testing :
public void add(String image_id, Long date, String path) {
SQLiteDatabase db = this.getWritableDatabase();
Log.d("SQL", "date " + date);
It prints 1
D/SQL: date 1
