Skip to Content
author's profile photo Former Member
Former Member

How to Calculate midpoint between two times ?

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.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Dec 14, 2011 at 03:24 PM

    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.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 13, 2011 at 12:19 PM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 13, 2011 at 12:37 PM

    hi

    << Moderator message - Cut and paste response from time difference 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

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.