Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why do SQLiteStudio (and others) not display a datetime in human-readable format by default?

Today I had to use a SQLite database for the first time and I really wondered about the display of a DATETIME column like 1411111200. Of course, internally it has to be stored as some integer value to be able to do math with it. But who wants to see that in a grid output, which is clearly for human eyes?

I even tried two programs, SQLiteStudio and SQLite Manager, and both don't even have an option to change this (at least I couldn't find it).

Of course with my knowledge about SQL it didn't take long to find out what the values mean - this query displays it like I expected:

select datetime(timestamp, 'unixepoch', 'localtime'), * from MyTable

But that's very uncomfortable when working with a GUI Tool. So why? Just because? Unix nerds? Or did I just get a wrong impression because I accidentally tried the only 2 Tools which are bad?

(I also appreciate comments on which tools to use or where I can find the hidden settings.)

like image 601
maf-soft Avatar asked Dec 08 '25 10:12

maf-soft


1 Answers

Probably because sqlite doesn't have a first-class date type — how would a GUI tool know which columns are supposed to contain dates?

like image 51
Eevee Avatar answered Dec 10 '25 02:12

Eevee



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!