TDengine数据库中2020-06-0210:40:28.001的时间类型如何转换为1591065628?

how to convert the time type of 2020-06-02 10:40:28.001 to 1591065628 in TDengine database?

如何将TDengine数据库中2020-06-0210:40:28.001的时间类型转换为1591065628?
我想把时间转换成某种格式,可以在shell中看到。举个例子,我想把时间2020-06-0210:40:28.001转换成1591065628,怎么办?

你可以使用 taos -r 选项,它将输出时间为 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)