如何区分时间戳(在 string )在 hive 里?我试过用
string
date_format(column_name,'yyyy-MM-dd HH:mm:ss.sss')
转换成 timestamp 但不同的是给了我一个 null 价值
timestamp
null
jc3wubiy1#
尝试使用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('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;
1条答案
按热度按时间jc3wubiy1#
尝试使用unix\u时间戳函数
你的问题应该是