How to Calculate the difference between two dates and times

Hi Guys,
Pls, can someone help me urgently.

I need to calculate the difference between 2 dates and times.
eg. GR Date - 10.01.2008; GR Time - 16:20:44 and
UD Date - 15.01.2008; UD Time - 20:01:49
Difference = 5 days, 3 hours, 41 minutes.

Is there any function module that I can use to get this difference?

I do have one (SD_DATETIME_DIFFERENCE) which calculates the days and hours, but now the client also wants the minutes included.

Thanks!

********************************************************************

Use this FM /SDF/CMO_DATETIME_DIFFERENCE.
use fm L_TO_TIME_DIFF
Pls Try to use Class "CL_ABAP_TSTMP"

from : http://sap.ittoolbox.com/groups/technical-functional/sap-dev/

Comments

Popular posts from this blog

ABAP Dialog Programming : Set Filter data of Table Control

Step by step Create SAP LIS Report

SAP Bapi Price Change (MR21)