Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Date difference

Former Member
0 Likes
425

data : vdiff like eban-badat,

p_high like eban-badat,

p_low like eban-badat.

p_high = mbadat-high+0(6).

p_low = mbadat-low+0(6).

  • wish to calculate diffrence but vdiff is always having zero *

vdiff = p_high - p_low.

IF vdiff is not INITIAL.

message id '00' type 'E' number '001'

with 'Date Range should be 1 Month'.

ENDIF.

Wht shuld be done to reslove thius

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
395

Hi Abhut,

V_Diff should be a Int type variable , which will hold the difference of the dates.

and the date is usually 8 characters long.

Why are you taking only 6 chracters of the mbadat?

v_diff = date2 - date1. "v_diff will have difference in number of days date2 and date1 should be of date type and should have 8 characters in them.

Regards,

Ravi Kanth Talagana

2 REPLIES 2
Read only

Former Member
0 Likes
395

resolved

Read only

Former Member
0 Likes
396

Hi Abhut,

V_Diff should be a Int type variable , which will hold the difference of the dates.

and the date is usually 8 characters long.

Why are you taking only 6 chracters of the mbadat?

v_diff = date2 - date1. "v_diff will have difference in number of days date2 and date1 should be of date type and should have 8 characters in them.

Regards,

Ravi Kanth Talagana