色调配置单元/ Impala sql问题

ibrsph3r  于 2021-06-26  发布在  Hive
关注(0)|答案(1)|浏览(292)

我试图使用色调Hive/ Impala 选择找到一个时间框架,我得到的是

2017-02-22T17:47:54.00+00:00 2017-02-22T17:36:42.00+00:00 2017-02-22T17:33:08.00+00:00

都是t,我怎样才能把t改成下面的空格:

2017-02-22 17:47:54.00+00:00

我使用的是从数据中选择日期和时间

n7taea2i

n7taea2i1#

Hive

hive> select from_unixtime(unix_timestamp('2017-02-22T17:47:54.00+00:00',"yyyy-MM-dd'T'HH:mm:ss")) as ts;
OK
ts
2017-02-22 17:47:54

Impala

> select from_unixtime(unix_timestamp('2017-02-22T17:47:54.00+00:00',"yyyy-MM-ddTHH:mm:ss")) as ts;

+---------------------+
| ts                  |
+---------------------+
| 2017-02-22 17:47:54 |
+---------------------+

相关问题