Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

DBeaver: display datetime with milliseconds

This is MySQL 5.7 column:

`date` datetime(6) NOT NULL

I can see milliseconds using console:


mysql> select * from teq_log_1;
+----+----------------------------+-------+---------+---------+
| id | date                       | level | message | details |
+----+----------------------------+-------+---------+---------+
|  4 | 2019-08-01 12:23:34.123457 |     2 | test    | NULL    |
+----+----------------------------+-------+---------+---------+

but I cannot see milliseconds in DBeaver client:

enter image description here

There is format option for the date column (Right Click on date column / View/Format / Data Formats ...):

enter image description here

There are Date, Time, Timestamp & Number types (w/o Datetime). I set yyyy-MM-dd HH:mm:ss.sss & yyyy-MM-dd HH:mm:ss.mmm patterns but without result.

How can I display milliseconds/microseconds for datetime(6) in DBeaver (v. 6.1.3)?

like image 813
Alex Gusev Avatar asked Aug 01 '19 08:08

Alex Gusev


People also ask

How do I change the datatype of a column in DBeaver?

To change the data presentation in a certain column, right-click a cell in the column. Then, on the context menu, click View/Format -> Set {column name} format and click the presentation type name: The Transformer settings window opens showing the value in the chosen format.

What type of SQL does DBeaver use?

DBeaver has both a community edition (CE) which is free and open-source and a commercial enterprise edition (EE). The community edition supports all kinds of relational databases such as MySQL, PostgreSQL, Oracle, etc. The enterprise edition, on the other hand, also supports NoSQL databases.


2 Answers

Turning on Use native date/time format did it for me.

like image 163
Alec Gerona Avatar answered Sep 27 '22 20:09

Alec Gerona


Using uppercase SSS as in yyyy-MM-dd HH:mm:ss.SSS shows milliseconds - you were using lowercase sss

like image 24
nicstella Avatar answered Sep 27 '22 18:09

nicstella