Focal Point
[CLOSED] Oracle to Db2 date format conversion

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/1957080436

October 11, 2013, 03:29 PM
Rakesh P
[CLOSED] Oracle to Db2 date format conversion
Dear All,,

We have recently migrated the webfocus from 716 to 77. The below date format code is not working in 77, but working fine in 716. The code converts the input oracle date to db2 format. Please help me to resolve this issue

Code in 716:
-SET &INPUT_ORA_PFF_DT = '01-OCT-2013';
-SET &DB2_PFF_DT=DATETRAN(DATECVT(HINPUT(11,&INPUT_ORA_PFF_DT, 8, 'DMYY'),'I6YMD', 'YYMD'),'(YYMD)', '(-)', 'EN', 10, 'A10') ;

In 77
I am getting this error
(FOC36355) INVALID TYPE OF ARGUMENT #4 FOR USER FUNCTION HINPUT

This message has been edited. Last edited by: <Kathryn Henning>,


Webfocus 7.1.6, Webfocus 7.7, Webfocus 8
October 12, 2013, 02:15 AM
Alan B
Not sure why this would ever work. HINPUT requires a datetime format as output. You can achieve this a couple of ways:
-SET &INPUT_ORA_PFF_DT = '01-OCT-2013';
-SET &DB2_PFF_DT=HCNVRT(HINPUT(11,&INPUT_ORA_PFF_DT, 8, 'HDMYY'),'(HYYMD-)',10,'A10');
-TYPE &DB2_PFF_DT

-SET &DB2_PFF_DT=DATETRAN(HDATE(HINPUT(11,&INPUT_ORA_PFF_DT, 8, 'HDMYY'),'YYMD'),'(YYMD)','(-)','EN',10,'A10') ;
-TYPE &DB2_PFF_DT



Alan.
WF 7.705/8.007