SQLite Forum

sqlite3 rounding off the values of timestamp causing issues
Login
You should make up your mind regarding the type of a "timestamp".

If, as your example suggests, you are using a floating point representation the you should declare the column as REAL.

If you decide to switch to ISO time strings, then you should declare the column as CHAR or TEXT (there is no VARCHAR in SQLite).

With a declared storage class of TEXT, you are forcing SQLite to convert REAL to TEXT somewhere along the line, which is documented to preserve only 15 significant digits.

asql> select cast(1536273869.654473892 as text);
1536273869.65447