Days Elapsed since Date
Posted: Fri Sep 01, 2017 4:05 pm
I need to calculate the days elapsed since the Invoice date.
I've searched through the Technical Reference Guide online and found the DATEDIFFERENCE bif. I tried this BIF in my web page but got the error that 'Use is not supported on the web'. Is there a way to use it in my web page? So I used it in my server module.
Use Builtin(DATEDIFFERENCE) With_Args(*date8 A #WIDT20 1)
TO_GET(#StkAgeDays)
But I get these errors:
Value 1 is not valid for parameter DATEDIFFERENCE.
Missing output arguments for built-in function DATEDIFFERENCE (Required 1; Supplied 0).
Invalid or unexpected character at column 1.
TO_GET( #StkAgeDays ) is not a valid name.
The Technical Reference says:
•Valid formats for first and second dates: A, B, D, F, H, J, L, V and 1.
So 1 has a date format = CYYMMDD and WIDT20 comes from the Iseries as 7,0P in said format.
And A is in system date format.
StkAgeDays is a field I created in the repository and checked-in as Type = Signed and Length = 4.
What do I need to do to get this to work please?
I've searched through the Technical Reference Guide online and found the DATEDIFFERENCE bif. I tried this BIF in my web page but got the error that 'Use is not supported on the web'. Is there a way to use it in my web page? So I used it in my server module.
Use Builtin(DATEDIFFERENCE) With_Args(*date8 A #WIDT20 1)
TO_GET(#StkAgeDays)
But I get these errors:
Value 1 is not valid for parameter DATEDIFFERENCE.
Missing output arguments for built-in function DATEDIFFERENCE (Required 1; Supplied 0).
Invalid or unexpected character at column 1.
TO_GET( #StkAgeDays ) is not a valid name.
The Technical Reference says:
•Valid formats for first and second dates: A, B, D, F, H, J, L, V and 1.
So 1 has a date format = CYYMMDD and WIDT20 comes from the Iseries as 7,0P in said format.
And A is in system date format.
StkAgeDays is a field I created in the repository and checked-in as Type = Signed and Length = 4.
What do I need to do to get this to work please?