Reputation: 9
how to convert the time type of 2020-06-02 10:40:28.001 to 1591065628 in TDengine database?
I want to convert the time in a certain format and can see it in the shell. Take an example, I want to convert the time 2020-06-02 10:40:28.001 to 1591065628, what should I do?
Upvotes: 0
Views: 24
Reputation: 301
you can use taos -r option, it will output time as uint64_t
ubuntu@taos ~ $ taos -r
taos> use test;
Database changed.
taos> select * from tb;
ts | speed | desc |
================================================================
1644216894189 | 1 | test |
Query OK, 1 row(s) in set (0.006103s)
Upvotes: 0