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

To substarct time from a date

Hi

Can you please suggest a method or function module to subtract time from a date+time.

Eg : substract 10 mints from Feb 02 2007, 00:00:05

Thanks

Shaju

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Mar 08, 2008 at 12:13 AM

    Hi,

    I think the better way is to convert time also in date-time stamp field and then use.

    Not sure if it will worl or not, just try once.

    Regards,

    Atish

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Mar 08, 2008 at 02:56 AM

    hi,

    try this Function Module.

    SUBTRACT_TIME_FROM_DATE

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Apr 12, 2008 at 10:44 AM

    Try IGN_TIMESTAMP_PLUSMINUS

    Backward is for subtracting.

    Regards

    Neel

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Apr 12, 2008 at 12:29 PM

    Hi shaju,

    try this function module...

    C14Z_CALC_DATE_TIME

    but here you have to convert the time to seconds to add...

    to subtract...

    put the negetive sign for the number of seconds you want to subtract

    Import parameters Value

    I_ADD_SECONDS 3,600-

    I_UZEIT 00:00:10

    I_DATUM 20.04.2008

    the result will be

    Export parameters Value

    E_DATUM 19.04.2008

    E_UZEIT 00:00:10

    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.