我正试图在一个时间间隔上加/减14分钟,但不断收到错误或空值
我在做什么
select f.act_arrv_dtmz, from_unixtime(unix_timestamp('f.ACT_ARRV_DTMZ')+840)
但我一直收到一个错误。我也在尝试使用cast
select act_dprt_dtmz, CAST(act_dprt_dtmz as timestamp) - cast(from_unixtime(unix_timestamp(act_dprt_dtmz)+840) as timestamp) from heart_beat_data_temp;
这并没有给出正确的时间和我将变量加引号的时间
select act_dprt_dtmz, CAST(act_dprt_dtmz as timestamp) - cast(from_unixtime(unix_timestamp('act_dprt_dtmz')+840) as timestamp) from heart_beat_data_temp;
它给我空的
我希望无论act\U dprt\U dtmz时间戳加上14分钟
1条答案
按热度按时间uemypmqf1#
希望能成功:-)