select (hour(from_unixtime(unix_timestamp(‘2021092907’, ‘yyyyMMddHH’)))-hour(from_unixtime(unix_timestamp(‘2021092807’, ‘yyyyMMddHH’)))+(datediff(from_unixtime(unix_timestamp(‘2021092907’, ‘yyyyMMddHH’)), from_unixtime(unix_timestamp(‘2021092807’, ‘yyyyMMddHH’))))*24) as hour_dValue from aud.test_cdr;



