‎2007 Jun 19 6:49 AM
Dear All,
I have to upload the data from excel sheet . in the excel sheet timeis maintained as 5.26 PM , 5.26 AM . How can I conver that into 24 hrs format .
For example .
5.26 PM = 17:26
5.26 AM = 05:26
‎2007 Jun 19 6:52 AM
Hi
Checkout FM <b>HRVE_CONVERT_TIME</b>
<a href="http://help.sap.com/saphelp_nw04/helpdata/en/ec/d940be400d11d3aa27006094b92fad/frameset.htm ">http://help.sap.com/saphelp_nw04/helpdata/en/ec/d940be400d11d3aa27006094b92fad/frameset.htm</a>
Regards
Raj
Message was edited by:
Rajasekhar Dinavahi
‎2007 Jun 19 6:54 AM
Hi,
Check this sample code..
DATA: V_INPUT(8) VALUE '5.26 AM'.
DATA: V_TIME TYPE SYUZEIT.
DATA: V_LENGTH TYPE I.
* get the length
V_LENGTH = STRLEN( V_INPUT ).
IF V_INPUT+V_LENGTH(2) = 'PM'.
V_INPUT+V_LENGTH(2) = ''.
V_TIME = V_INPUT + 12. " If it is PM add 12 hours.
ELSE.
V_INPUT+V_LENGTH(2) = ''.
V_TIME = V_INPUT.
ENDIF.
WRITE: V_TIME.
Thanks
Naren
‎2007 Jun 19 7:02 AM
Hi,
SD_CALC_DURATION_FROM_DATETIME
HR_TIME_RESULTS_GET
CALL FUNCTION 'DELTA_TIME_DAY_HOUR'
CCU_TIMESTAMP_DIFFERENCE
<b>Reward points</b>
Regards
‎2007 Jun 19 7:34 AM
Hi,
Use the FM HRVE_CONVERT_TIME
split the time at space into time and format and pass the same
this will solve your problem
the parameters passed are shown below :
Import parameters Value
TYPE_TIME B
INPUT_TIME 09:00:00
INPUT_AM_PM PM
Export parameters Value
OUTPUT_TIME 21:00:00
OUTPUT_AM_PM
Regards
Shiva