select t.id,to_char(timestamp / (1000 * 60 * 60 * 24) + to_date('1970-01-01 08:00:00', 'yyyy-mm-dd hh24:mi:ss'), 'yyyy-mm-dd hh24:mi:ss') from table;