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

Subtract 2 dates.

Hi all,

We have a scenario to calculate the diff between two dates. By using formula variables, I am able to subtract the dates. But, it gets complicated when one or both the dates is " # ". The requirement is to display " NA " , in such a scenario. How do I accomplish this ?

Any clues on this will be extremely helpful. Thanks a lot !!

Regards

Niranjana

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Feb 09, 2010 at 05:35 AM

    Hi,

    Yes, the problem is there when any of the date is not available; to acheive this,

    create a third Keyfigure, and write a characteristic routine in the Transformations by using the Logic: substract the two dates, if any of the date is not available then insert the result as NA

    Regards

    ReddY A

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Feb 09, 2010 at 01:06 AM

    Hi ,

    I think you can use Formula and use If else condtion

    if date1 - date 2 = # then display 'NA'

    else display no. of days .

    Regards

    S

    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.