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

How to Calculate midpoint between two times ?

Former Member
0 Likes
4,613

Hi all,

I need help to find out how to take midpoint of 2 timings.

Actually i am working for daily punches done by any employee.

Hence to find the midpoint of an employees IN & OUT punch

i.e midpoint of 2 different timings so as to determine in which time slot he was present.

Regards,

Sandhya.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,917

You can use the function modules in function group SCA4 to do this.

DURATION_DETERMINE - gives you the duration between the two date/times (get the value back in minutes)

Divide this by 2 to get the duration half way between the start and end times

END_TIME_DETERMINE - to determine the data and time at the halfway point, using the start date and the calculated duration from above.

Hi,

Fm L_MC_TIME_DIFFERENCE - is ued to Find the (time) difference between two timings.

Above fm is helpful to u.Otherwise go for second one.

SD_CALC_DURATION_FROM_DATETIME: Find the difference between two date/time and report the difference in hours

3 REPLIES 3
Read only

Former Member
0 Likes
1,917

Hi,

Fm L_MC_TIME_DIFFERENCE - is ued to Find the (time) difference between two timings.

Above fm is helpful to u.Otherwise go for second one.

SD_CALC_DURATION_FROM_DATETIME: Find the difference between two date/time and report the difference in hours

Read only

Former Member
0 Likes
1,917

hi

<< Moderator message - Cut and paste response from removed. Plagiarism is not allowed in SCN >>

chaitanya

Edited by: Chaitanya.M on Dec 13, 2011 1:37 PM

Edited by: Rob Burbank on Dec 14, 2011 10:25 AM

Read only

Former Member
0 Likes
1,918

You can use the function modules in function group SCA4 to do this.

DURATION_DETERMINE - gives you the duration between the two date/times (get the value back in minutes)

Divide this by 2 to get the duration half way between the start and end times

END_TIME_DETERMINE - to determine the data and time at the halfway point, using the start date and the calculated duration from above.