在Informix中将纪元转换为可读的日期/时间格式

时间:2014-01-22 14:18:32

标签: sql informix

我有一个基本的Informix查询,想知道是否可以将纪元时间转换为sql查询可读的内容。该字段为dateTimeOrigination;

SELECT
    dateTimeOrigination,
    callingPartyNumber,
    finalCalledPartyNumber 
FROM tbl_billing_data 
WHERE finalCalledPartyNumber LIKE 'XXXX'
    OR callingpartynumber LIKE 'XXXX' 
ORDER BY datetimeOrigination

1 个答案:

答案 0 :(得分:1)

使用内部 dbinfo 功能。有关它的更多信息,请阅读手册here

select dbinfo('utc_to_datetime', dateTimeOrigination) ,
  callingPartyNumber,finalCalledPartyNumber 
from tbl_billing_data 
where finalCalledPartyNumber like 'XXXX' 
  or callingpartynumber like 'XXXX' 
order by datetimeOrigination