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

Convert date to timestamp- Very urgent

Hi friends,

I have a very urgent requirement to convert date to timestamp.

Please help me out ASAP.

Thanks & regards,

Srilakshmi B

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

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

    Hi ,

    FMs:

    BDL_GET_CENTRAL_TIMESTAMP

    DATE_2D_TO_4D_CONVERSION

    DATE_CONV_EXT_TO_INT

    DATE_TIME_CONVERT

    Another Way

    The timestamp is in the format <date><time>. for example (20072404161312), the date is 20072404 and time is 161312. You can transfer the timestamp into a string and then split the data. You can use the following ABAP code to separate the date from the time:

    "w_ts is your timestamp, w_s is the temporary string

    "w_date and w_time will be your final date and time.

    data: w_ts type timestamp.

    data: w_s type string.

    data: w_date type sy-datum,

    w_time type sy-uzeit.

    w_ts = '20071111161312'.

    w_s = w_ts.

    w_date = w_s(8).

    w_time = w_s+8(6).

    Regards

    Add a comment
    10|10000 characters needed characters exceeded

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

    check the following ABAP statements:

    GET TIME STAMP
    CONVERT DATE

    Reward points, if answer meets your expectation

    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.