Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

How to format time stamp I got by Get Time

Former Member
0 Kudos
54

Hello All:

I am using GET TIME STAMP FIELD ltimestamp command in ABAP. I declared ltimestamp as timestampl. I am getting the value 20080130200007.6870490 which is fine but how do I format date to to 2008-01-30 and time to 20:00:07.6870490?

Thanks.

Mithun

1 REPLY 1

Former Member
0 Kudos
36

if suppose data field contains 20080130200007.6870490 .

concatenate data+0(4)

data+4(2)

data+6(2)

into date

separated by '-'.

concatenate data+8(2)

data+10(2)

data+12(2)

into temp_time

separated by ':'.

concatenate temp_time

data+15(7)

into time

separated by '.'.