Skip to Content
author's profile photo Former Member
Former Member

How to format time stamp I got by Get Time

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

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Jan 30, 2008 at 08:19 PM

    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 '.'.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.