‎2008 Jan 02 11:00 AM
Dear All,
How can i calculate the difference between times
lv_start = 10:25:30
lv_end = 10:50:30
Now i want the output in the same time format i.e Duration = 00:25:00
How can i get this?
Regards
shoban
‎2008 Jan 02 11:10 AM
Hi,
Just declare a variable
data: x like SY-UZEIT.
x = lv_start - lv_end.
I think this will serve the purpose.
Regards
Vadi
‎2008 Jan 02 11:10 AM
Hi,
Just declare a variable
data: x like SY-UZEIT.
x = lv_start - lv_end.
I think this will serve the purpose.
Regards
Vadi
‎2008 Jan 02 11:11 AM
Refer these FMs -
/SDF/CMO_TIME_DIFF_GET
TIMECALC_DIFF
SCSM_TIME_DIFF_GET
SCOV_TIME_DIFF
SRET_TIME_DIFF_GET
Regards,
Amit
‎2008 Jan 02 11:12 AM
‎2008 Jan 02 11:23 AM
data : lv_start(10), lv_end(10), H1(5),M1(5),S1(5),H2(5),M2(5),S2(5).
data : H type I,M type I,S type I.
lv_start = '10:25:30'.
lv_end = '10:50:30'.
H1 = lv_start+0(2).
M1 = lv_start+3(2).
S1 = lv_start+6(2).
H2 = lv_end+0(2).
M2 = lv_end+3(2).
S2 = lv_end+6(2).
H = H2 - H1.
M = M2 - M1.
S = S2 - S1.
write : / H,':',M,':',S.
This code only for this one, if we give lv_end 01:30:12 like this may not gives correct result
‎2008 Jan 02 11:26 AM
hi
good
check this
L_MC_TIME_DIFFERENCE - Calculate time difference in minutes
thanks
mrutyun^
‎2008 Jan 02 11:36 AM
Hi
Shoban babu
data:
w_temp type i,
w_diff like sy-uziet.
w_temp = lv_end - lv_end.
w_diff = w_temp.
write: / w_diff.
it is more thewn enough plzz reward if it usefull
for any furthere quiries mu mail id mutyalasunilkumar@gmail.com
plzz dont forget to reward........