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

days between tow dates in layout

hi,

I have two date characteristics in a lead column ( date from and date to), I have a key figure ( KF1) that needs be a formula ( date to - date from ) in order to obtain the days between them.

This formula is a visualbasic code with sapafterdataput macro.

When I put the data in the dates format dd/mm/yyyy, with this format my formula ( date to - date from ) works fine. But when I save the field changes and it is not recognized like date and my formula fault showing #VALUE.

I need some solution, with fox formula I don't found how can I obtain days between two dates.

I would appreciate your help.

regards,

victoria

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on May 25, 2007 at 06:11 AM

    Hi,

    If you create a FOX Formula wherein you create a local variable of type integer and assign the value to the variable by directly subtracting the two dates, wont you have what you want?

    Example:

    Function Type Formula;

    Characteristics to be changed : Dateto, Datefrom.

    DATA ZDAYS TYPE I.

    DATA ZDT TYPE DATETO.

    DATA ZDF TYPE DATEFROM.

    ZDT = OBJV().

    ZDF = OBJV().

    ZDAYS = ZDT-ZDF.

    {KF,ZDT,ZDF} = ZDAYS.

    Regards

    Sriram

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on May 29, 2007 at 10:44 AM

    Hi,

    In the Query definition, choose the Row - Budget Item. In the properties, go to Tab - Extended. Here, under Filter Selection for Query execution, select "Values in Master Data Table". Save. Now you should be able to get all materials during the drop-down!

    Regards

    Sriram

    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.