11-17-2006 4:47 AM
Hi,
I am having a filed of type TIMS, I want to convert and out put that as HH:MM:SS,
Please let me know .
Regards,
Irfan Hussain
11-17-2006 4:50 AM
HI,
use the WRITE statement..
DATA: V_CHAR(8).
WRITE: SY-UZEIT TO V_CHAR.
WRITE: / V_CHAR.
Thanks,
Naren
11-17-2006 4:53 AM
a tims type field is held internally as hhmmss but will appear if written as hh:mm:ss. You should not have to do any conversion.
11-17-2006 4:54 AM
DATA : MYTIME(8) TYPE C.
DATA : T1 TYPE SY-UZEIT.
*--------------------------------
MYTIME = '06,45,00'.
WRITE 😕 'BEFORE ' , MYTIME.
REPLACE ALL OCCURRENCES OF ',' IN MYTIME WITH ''.
T1 = MYTIME.
WRITE 😕 'AFTER ' , T1.
11-17-2006 4:59 AM
Hi Neil,
It is stored in the data base table as HHMMSS, but i need to display it as HH:MM:SS in the out put.
Please help.
Regards,
Irfan Hussain
11-17-2006 5:43 AM
eg,
DATA TIME TYPE T VALUE '154633'.
WRITE (8) TIME USING EDIT MASK '__:__:__'. "Output: 15:46:33
11-17-2006 5:04 AM
take a varible as v_char(8).
Now, as time is stored in TIMS variable in format HHMMSS.
concatenate tims0(2) ':' tims2(2) ':' tims+4(2) into v_char.
Write:/ v_char
Output is displayed as HH:MM:SS
09-01-2020 11:31 AM
as @juergen.ette said https://answers.sap.com/answers/11686564/view.html at an older post, you can use CL_ABAP_TIMEFM=>CONV_TIME_EXT_TO_INT/CONV_TIME_INT_TO_EXT
03-24-2022 5:03 PM
Hi, maybe that be a solution for you.
|{ tim(2) }:{ tim+2(2) }:{ tim+4(2) }|.