‎2008 Oct 06 3:38 PM
Hi,
I am getting one output from the table with date and time ex 20081210053409 (yyyymmddhrmmss). This fiemd I want to split into time with the format of HH:MM:SS.
How I do it.
Thanks
RB
‎2008 Oct 06 3:43 PM
split the string into 2 variables:
gv_date type sy-datum
gv_date_txt(10).
gv_time type sy-uzeit.
gv_time_txt(8)
simply write gv_time to gv_time_txt will formate according to user settings
‎2008 Oct 06 3:43 PM
split the string into 2 variables:
gv_date type sy-datum
gv_date_txt(10).
gv_time type sy-uzeit.
gv_time_txt(8)
simply write gv_time to gv_time_txt will formate according to user settings
‎2008 Oct 06 4:03 PM
Go with Volkers solution and forget about the others....
>
> split the string into 2 variables:
> gv_date type sy-datum
> gv_date_txt(10).
> gv_time type sy-uzeit.
> gv_time_txt(8)
>
> simply write gv_time to gv_time_txt will formate according to user settings
And if you don't know how to get the values:
gv_date = gv_datetime(8).
gv_time = gv_datetime+8(6).
‎2008 Oct 06 3:47 PM
Hi,
You can split like
2008/12/10/05/34/09 at '/'(for example) and concatenate them accordingly to your final output field.
Thanks,
Sree.
‎2008 Oct 06 3:55 PM
datetime = 20081210053409 (yyyymmddhrmmss)
CONCATENATE datetime8(2) ':' datetime10(2) ':' datetime+12(2) INTO time.
‎2008 Oct 06 4:19 PM
just read the F1 Documentation on the below
CONVERT TIME STAMP time_stamp TIME ZONE tz
INTO [DATE dat] [TIME tim]
[DAYLIGHT SAVING TIME dst].
there is a sample code in it see that.