cancel
Showing results for 
Search instead for 
Did you mean: 

Difference between two dates in FOX formula

0 Kudos
702

Hi Experts,

I am a newbie here.

I am trying to find the difference between 2dates using FOX formulas, below is my code.

DATA VDATE TYPE ZVALUEDT.
DATA MDATE TYPE ZMATURITY.
DATA V_DATE TYPE D.
DATA M_DATE TYPE D.
DATA PER TYPE 0CALDAY.


FOREACH ZFD.
VDATE = ATRV( ZVALUEDT , ZFD).
MDATE = ATRV( ZMATURITY, ZFD).
V_DATE = VDATE.
M_DATE = MDATE.

PER = M_DATE - V_DATE .

{'/ERP/QUANTY',XXX,ZFD,MDATE,VDATE} = PER.

ENDFOR.

Not sure on the type of 'PER' variable here.. Is there any function to find the differences directly?

Thank you in advance.

Rajesh.

View Entire Topic
cornelia_lezoch
Active Contributor
0 Kudos

Hi Rajesh,

well, then you could define it in format D.

I am not sure what the value would be then and if this would then fit into your key figure...

regards

Cornelia