Hive 配置单元中的时间戳差异(以字符串形式)

Hive 配置单元中的时间戳差异(以字符串形式),hive,timestamp,Hive,Timestamp,如何在配置单元中区分时间戳(在字符串中) 我试着用 date_format(column_name,'yyyy-MM-dd HH:mm:ss.sss') 要转换为时间戳,但不同之处在于给了我一个null值尝试使用unix\u时间戳函数 select unix_timestamp('2018-03-03 00:08:48.409') - unix_timestamp('2018-03-02 00:08:48.409'); +--------+--+ | _c0 | +--------+-

如何在配置单元中区分时间戳(在
字符串中

我试着用

date_format(column_name,'yyyy-MM-dd HH:mm:ss.sss') 

要转换为
时间戳
,但不同之处在于给了我一个
null

尝试使用unix\u时间戳函数

select unix_timestamp('2018-03-03 00:08:48.409') - unix_timestamp('2018-03-02 00:08:48.409');
+--------+--+
|  _c0   |
+--------+--+
| 86400  |
+--------+--+
您的查询类似于

select (unix_timestamp(step_start_time) - unix_timestamp(step_end_time ))diff;

请发布时间戳字符串的外观以及预期的输出。(step_start_time string,step_end_time string)step_start_time formart-2018-03-01 00:08:48.409谢谢,之前我是从unix时间戳(unix时间戳(step_start_time)-unix时间戳(step_end_time))这是混乱的输出…现在我得到的问题