Difference Between Tow Date
Posted: Tue May 18, 2004 6:02 am
Can any body help me in DataStage Designer , How to get number of days between to date , currently I am using routine DateGenericDateDiff,
and here we have to give input date like 20040518 (yyyymmdd) , toget this format we have to first conver date into string format then substr for year, month and day and merge. Due to this resone my job is running very much slow .
Ex:- DateVal1 := 2004-05-18
DateVal2 := 2004-05-18
DateGenericDateDiff
(DateVal1[1,4]:DateVal1[6,2]:DateVal1[9,2],
DateVal1[1,4]:DateVal1[6,2]:DateVal1[9,2] )
Is it any routine available where we can pass two date directly jsut like
oracle ?
select (sysdate-to_date('2004-05-18','YYYY-MM-DD') )
from dual
and here we have to give input date like 20040518 (yyyymmdd) , toget this format we have to first conver date into string format then substr for year, month and day and merge. Due to this resone my job is running very much slow .
Ex:- DateVal1 := 2004-05-18
DateVal2 := 2004-05-18
DateGenericDateDiff
(DateVal1[1,4]:DateVal1[6,2]:DateVal1[9,2],
DateVal1[1,4]:DateVal1[6,2]:DateVal1[9,2] )
Is it any routine available where we can pass two date directly jsut like
oracle ?
select (sysdate-to_date('2004-05-18','YYYY-MM-DD') )
from dual