‎2008 Feb 20 6:37 AM
Hi All,
I need to get a FM that can help me to calculate the diff between 2 date by return the result in hours:
Start date = 01.12.2007
Start time = 10:00:00
End date = 02.12.2007
End time = 01:00:00
Result should be 15:00:00.
Please comment.
Thanks in advance.
‎2008 Feb 20 6:48 AM
Hi ,
You can try this function module
'L_TO_TIME_DIFF'
In the field "i_time_uom " give the unit of measure
H -hours
d- days
s - seconds.
Regards,
Mandeep
‎2008 Feb 20 6:40 AM
‎2008 Feb 20 6:41 AM
Hi,
Check the below FM's.
SD_DATETIME_DIFFERENCE,
/SDF/CMO_DATETIME_DIFFERENCE
Rgds,
Bujji
‎2008 Feb 20 6:42 AM
Hi
Check this FM..
Its as per ur rqmt..
/SDF/CMO_DATETIME_DIFFERENCE
Thanks
Praveen
‎2008 Feb 20 6:44 AM
‎2008 Feb 20 6:48 AM
Hi ,
You can try this function module
'L_TO_TIME_DIFF'
In the field "i_time_uom " give the unit of measure
H -hours
d- days
s - seconds.
Regards,
Mandeep
‎2008 Feb 20 2:16 PM
‎2008 Feb 20 2:35 PM
hi
Hope it will help you.
<REMOVED BY MODERATOR>
Use this Function Module :-
CALL FUNCTION *'DAYS_BETWEEN_TWO_DATES'*
EXPORTING
i_datum_bis = wa_projcode-tasenddate
i_datum_von = wa_projcode-tasstdate
* I_KZ_EXCL_VON = '0'
* I_KZ_INCL_BIS = '0'
* I_KZ_ULT_BIS = ' '
* I_KZ_ULT_VON = ' '
* I_STGMETH = '0'
* I_SZBMETH = '1'
IMPORTING
E_TAGE = wa_projcode-days
* EXCEPTIONS
* DAYS_METHOD_NOT_DEFINED = 1
* OTHERS = 2
.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Edited by: Alvaro Tejada Galindo on Feb 20, 2008 9:35 AM