Thanks.

I just mentioned that we can use dateadd function.

SQL>select dateadd(SECOND,1500220712,timestamp '1970-01-01 00:00:00') from dual;

(EXPR)
---------------------
2017-07-16 15:58:32.0

--- 1 row(s) selected.





Best regards,
Yuan

From: Li, Ying-Shuai
Sent: Thursday, November 30, 2017 2:03 PM
To: user <user@trafodion.incubator.apache.org>
Cc: Liu, Yuan (Yuan) <yuan....@esgyn.cn>
Subject: Re: How to convert numeric to timestamp

the function converttimestamp in trafodion is convert  julian-timestamp value 
to timestamp and the julian-timestamp value must be in the range from 148731 
63200000000 to 274927348799999999.

The value 1500220712 is a unixtiime value, and it does not supported in 
trafodion now.

________________________________
李英帅
易鲸捷信息技术有限公司<http://www.esgyn.cn/>
手机:18701691214
邮箱:yingshuai...@esgyn.cn<mailto:luxiao.y...@esgyn.cn>

From: Liu, Yuan (Yuan)<mailto:yuan....@esgyn.cn>
Date: 2017-11-30 13:50
To: 
user@trafodion.incubator.apache.org<mailto:user@trafodion.incubator.apache.org>
Subject: How to convert numeric to timestamp
Hi Trafodioneers,

Does Trafodion have a function which can convert numeric to timestamp?

The value 1500220712 stands for 2017-07-16 23:58:32 in Linux.
[root@bigdata157 ~]# date -d @1500220712 +"%Y-%m-%d %H:%M:%S"
2017-07-16 23:58:32

Can we convert it the timestamp in Trafodion? I saw function CONVERTTIMESTAMP 
<http://trafodion.incubator.apache.org/docs/sql_reference/index.html#converttimestamp_function>
  in SQL manual, but it seems it does not work.

SQL>select converttimestamp(1500220712) from dual;

*** ERROR[8405] The operand of function CONVERTTIMESTAMP is out of range. 
[2017-11-30 13:36:11]

Best regards,
Yuan

Reply via email to