As I am reading, it looks like I can use the %diff with two date fields of the same type and get the number of days between the two within RPG FREE.
I have my system date defined as follows and want to look at the days difference to a 7 digit date from my physical file. I didredefine that date also I did defined the nodays as numeric.
tdate = %dec(%Char(%Date(udate:*mdy):*cymd0):7:0);
ffpdtx = %dec(%Char(%Date(ffpdt:*mdy):*cymd0):7:0);
nodays = %diff(tdate:ffpdtX:*days);
My complile error msgs are:
*RNF0580 20 1 The first parameter for %DIFF is not valid.
*RNF0581 20 1 The second parameter for %DIFF is not valid.
I think I am making this too hard. Thanks for your help.
I have my system date defined as follows and want to look at the days difference to a 7 digit date from my physical file. I didredefine that date also I did defined the nodays as numeric.
tdate = %dec(%Char(%Date(udate:*mdy):*cymd0):7:0);
ffpdtx = %dec(%Char(%Date(ffpdt:*mdy):*cymd0):7:0);
nodays = %diff(tdate:ffpdtX:*days);
My complile error msgs are:
*RNF0580 20 1 The first parameter for %DIFF is not valid.
*RNF0581 20 1 The second parameter for %DIFF is not valid.
I think I am making this too hard. Thanks for your help.
Comment