Help: How to get time in minutes by subtracting dates !!
Posted: Wed May 26, 2010 8:34 am
DataStage: 8.1 Enterprise
Database: Oracle 10g
I have 2 date columns (Timestamp datatype); one date comes out of driver query and other comes out of dataset. I want to subtract the date coming out driver query (Dt_Tm_1) from the dataset (Dt_Tm_2) in Transformer to check for <= 60 minutes. (Dt_Tm_2 - Dt_Tm_1 <= 60 minutes). How would I do it in the transformer? I am guessing I need to using Iconv/Oconv that I am not familiar with?... any easy way to check this in transformer?
BTW, Cannot do it in oracle SQL query due to the nature of data.. else doing it in oracle sql would be easy (Where Dt_Tm_2 - Dt_Tm_1 <= 1/24)....
Appreciate your response(s).
Thanks!!
Database: Oracle 10g
I have 2 date columns (Timestamp datatype); one date comes out of driver query and other comes out of dataset. I want to subtract the date coming out driver query (Dt_Tm_1) from the dataset (Dt_Tm_2) in Transformer to check for <= 60 minutes. (Dt_Tm_2 - Dt_Tm_1 <= 60 minutes). How would I do it in the transformer? I am guessing I need to using Iconv/Oconv that I am not familiar with?... any easy way to check this in transformer?
BTW, Cannot do it in oracle SQL query due to the nature of data.. else doing it in oracle sql would be easy (Where Dt_Tm_2 - Dt_Tm_1 <= 1/24)....
Appreciate your response(s).
Thanks!!