[英]Required get_date oracle sql function replacement in informatica expression transformation
I executed below query in oracle sql developer. 我在oracle sql developer中执行了以下查询。 create_date is number field in oracle.
create_date是oracle中的数字字段。
select create_date,get_date(create_date) from test;
Output: 输出:
CREATE_DATE GET_DATE(CREATE_DATE)
801172716 5/22/1995 19:58:36
In informatica expression transformation i tried many functions to convert that decimal to date.But i am not able to get the required date. 在informatica表达式转换中,我尝试了许多函数来将该小数转换为日期。但是我无法获得所需的日期。
Can someone tell me which expression should be used in informatica expression transformation. 有人可以告诉我在Informatica表达转换中应使用哪个表达。
Your create_date
numeric value represents a Unix Timestamp
value. 您的
create_date
数值代表Unix Timestamp
值。 You can use numtodsinterval
function as 您可以使用
numtodsinterval
函数作为
select to_timestamp('1970-01-01','yyyy-mm-dd hh24:mi:ss')
+ numtodsinterval(create_date,'second') as get_datetime
from test
to get the desired value. 获得所需的值。 If you need only the date part, then use :
如果只需要日期部分,请使用:
select
cast(
to_timestamp('1970-01-01','yyyy-mm-dd hh24:mi:ss')
+ numtodsinterval(create_date,'second')
as date
) as get_date
from test
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.