Application Development 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: 

Calculate time in minutes

Former Member
0 Kudos

Hello ,

I have to calculate time in minutes , for period of time between two measurements taken on different days (or same day ) .

So one is taken on e.g . 01-02-20010 at 15:25:00h another on 07-02-2010 at 6:33:22h I have to show that period in minutes

My question is is do you know any function doing that.

Thank you

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Use this FM /SDF/CMO_DATETIME_DIFFERENCE.

use fm L_TO_TIME_DIFF

Pls Try to use Class "CL_ABAP_TSTMP"

5 REPLIES 5

Former Member
0 Kudos

SD_DATETIME_DIFFERENCE

This will return Hours and minutes.You can convert the whole into minutes

SCOV_TIME_DIFF Check this also.

Regards,

Gurpreet

former_member1245113
Active Contributor
0 Kudos

hI

Check this

LEINT_DETERMINE_DURATION

Pass I_UNIT_OF_DURATION = 'MIN'

You get the result in Floating Format convert it to type P variable.

Regards

Ram

Former Member
0 Kudos

Use this FM /SDF/CMO_DATETIME_DIFFERENCE.

use fm L_TO_TIME_DIFF

Pls Try to use Class "CL_ABAP_TSTMP"

former_member182040
Active Contributor
0 Kudos

check the FM F4_CLOCK

kesavadas_thekkillath
Active Contributor
0 Kudos

v_hours = ( ( p_edate - p_sdate ) * 24

+ ( p_etime - p_stime ) / 3600 ).

v_mins = v_hours * 60.

Try this, im bit confused