October 22, 2010, 10:06 AM
<d3nis370>[CLOSED] Adding/Subtracting Dates
I am trying to do two things. One is take a date and add 30 to it. This is what I have so far. Also the LAST_CONTACT_DT is in P9 format.
DEFINE FILE FDI001
NEXTFOLLOWDATE/YYMD=FDI001.FDI001.FDI001_LAST_CONTACT_DT + 30
When I display NEXTFOLLOWDATE it returns this
Last contact dt
20100820
Next follow date
20100850
It should show
Last contact dt
20100820
Next follow date
20100919
The next thing I am trying to do is see how many days open an account has been. This is what I have so far. Also DT_REPORTED is in P9 format.
DEFINE FILE FDI001
CurrentDate/P9=20100903;
BEGDTI/I8YYMD=CurrentDate;
ENDDTI/I8YYMD=FDI001.FDI001.FDI001_DT_REPORTED;
BEGDT/YYMD=ENDDTI;
ENDDT/YYMD=ENDDTI;
DIFFDAYS/I4=BEGDT - ENDDT;
Once I display DIFFDAYS all I get are 0.
This message has been edited. Last edited by: Kerry, October 22, 2010, 11:04 AM
Dave...read the manual...!
What is WF suppossed to do with +30 ?
+30 days?
+30 hours?
+30 months?
use the help!
Ironicly... search for : DATEDIF
Do tell you didn't even try that...
Greets,Dave
October 24, 2010, 04:39 PM
WazFYI
The reason why your second option did not work is that you set the Begin and End dated the same.
BEGDT/YYMD=ENDDTI;
ENDDT/YYMD=ENDDTI;
As for adding a value to a date, if its stored ina P9, then its a number, you need to convert to a Smart Date, as you did in your second option.
This is basic stuff.