11-11-2013 06:32 AM
I have an input table with the columns PAYOUT_DT (numeric, date9) and REQ_MAT_DURATION (numeric, 2.0).
It's connected to an Extract transformation with a column using this expression:
intnx('year', PAYOUT_DT, REQ_MAT_DURATION, 'same')
An input row has these values:
Based on this I would expect the output value to be 24MAR2014, but it's 24MAR2013.
Where's the logic in this? :smileyshocked:
It works as intended for most other rows, but no all. Some output values are one year off, like above. What might cause the discrepancies?
11-11-2013 07:01 AM
your logic is right and its giving the right output of 24MAR2014.
i used the below code
format PAYOUT_DT next date9.;
11-11-2013 07:21 AM
Thanks, yes the logic definitely seems sound, but there's still discrepancies based on the data in my DVH.
Here's an example where the two upper rows get incorrect output values, while the two lower ones get correct output values.
|INPUT, PAYOUT_DT||INPUT, REQ_MAT_DURATION||OUTPUT VALUE|
The output years in the first two rows are 1 year lower than they should be.
Any idea what might cause this kind of discrepancy?
11-11-2013 07:32 AM
Please check my code below and it gives the desired output, including correct outputs for the first and second row.
just wanted to check if you are passing the numeric dates in intnx().
input PAYOUT_DT :date9. REQ_MAT_DURATION;
format PAYOUT_DT output_value date9.;
11-12-2013 05:34 AM
Thanks for the help. As it turned out, several of the values in the field REQ_MAT_DURATION had hidden decimals. DI Studio rounded them up automatically, however the INTNX-function handled them "raw".