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

Date Differenec

Hi Friends,

I need date difference in days e.g.

date1 = '20050210'

date2 = '20050205'

date3 = date1 - date2

-


o/p

date3 = 5.

-


Is there any FM? then please let me know.

Thanks in advance,

Parag

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Feb 11, 2005 at 03:59 AM

    Hello Parag,

    The subtraction operation on dates will take into consideration everything that you will need. So I suggest that you simply use the '-' operator.

    Regards,

    Anand Mandalika.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Feb 11, 2005 at 06:01 PM

    Although the other two repliers are correct, if you really want to use a function module the following one exists:

    HR_HK_DIFF_BT_2_DATES

    Using this module, you can bring back the difference in days, months or years.

    Hope that helps.

    Mary Kerschke

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Feb 11, 2005 at 07:00 PM

    Check function module "DAYS_BETWEEN_TWO_DATES"

    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.