Date Difference Calculation problem

I am creating a form which should calculate the number of days between two calender dat
es using the Date2Sum expression but my result cell gives me
zeo despite setting the locale and the calculation correcttly. Where could
my problem be?
Darlington Sakwa

Validate the date patterns on the date fields match the date patterns used in Date2Num. For example, the attached has a start date with the display date pattern date{YYYY-MM-DD} and that matches the date pattern in my Date2Num function call.
// form1.page1.startDateNum::calculate - (FormCalc, client)
if (form1.page1.startDate.isNull) then
  $.rawValue = ""
else
  $.rawValue = Date2Num(form1.page1.startDate.rawValue,"YYYY-MM-DD")
endif
Steve

Similar Messages

  • Date Difference Calculation in BW3.5

    Hi
    We are calculating date differences between 2 dates i.e. Delivery Date - System Date.For System date we used variable exit to derive the value.But when we create CKF on Delivery Date,we necessary have to keep date field in Drilldown(in rows).But reports needs to give Overview while including date field in rows removes the granularity.
    Is thier any other way we can handle this situation.
    Regards
    Praveen

    You have to put ur delivery date in Rows if u r doing the Formula variable with replacement path. There is no option.
    Khaja

  • Date difference calculation - help!

    hey people, i've got the below method, i'm trying to calculate the difference between two dates. the calculation is wrong as it is outputing the wrong duration... can anyone help?
    public int getDuration(Date startDate,Date endDate)
    GregorianCalendar start = new GregorianCalendar();
    start.setTime(startDate);
    GregorianCalendar end = new GregorianCalendar();
    start.setTime(endDate);
    long diff = 0L;
    if(start.getTime().before(end.getTime()) == true)
    diff = end.getTimeInMillis() - start.getTimeInMillis();
    diff = diff/(24*60*60*1000);
    Long L = new Long(diff);
    return L.intValue();
    THanks, Ian

    In the mean time, a couple of stylisitc suggestions:
    if(start.getTime().before(end.getTime()) == true)
    // == true is redundant and cluttersome
    if(start.getTime().before(end.getTime()))
    Long L = new Long(diff);
    return L.intValue();I'd suggest returning a long, rather than an int. If you insist on returning an int, because you're sure that the number of days will never be more than Integer.MAX_VALUE, then add an assertion that its not.
    assert diff <= Integer.MAX_VALUE : diff + " too big";The Long is overkill. If you do have a small enough value, just do return (int)diff;

  • [8i] Date/Time calculation problem...

    So, I am currently facing a situation where I need to calculate the total hours a workstation is in use for each day in a particular time period. I have a table with the log of each time each workstation is used. The problem is, a workstation can be used for any amount of time, starting on any day and ending on any day. This means that a particular entry in the log can span multiple days. I'm not sure how to split the difference between the end date/time of an entry and the start date/time of the entry over multiple days.
    Here's a sample table and some sample data for what I'm trying to do:
    -- Note: in reality, this table contains more columns
    CREATE TABLE     my_hrs
    (     record_id     NUMBER     NOT NULL
    ,     sdatetime     DATE     
    ,     edatetime     DATE     
    ,     workstation     VARCHAR2(4)
         CONSTRAINT my_hrs_pk PRIMARY KEY (record_id)
    -- Note: sdatetime, edatetime, and workstation CAN all be NULL, though I won't provide
    -- any sample data for these situations since I want to ignore them in my results
    -- Additionally, there are hundreds of workstations, but I'm only using 2 to simplify the sample data
    INSERT INTO     my_hrs
    VALUES (12345,TO_DATE('03/01/2010 08:00','mm/dd/yyyy HH24:MI'),TO_DATE('03/01/2010 13:35','mm/dd/yyyy HH24:MI'),'123A');
    INSERT INTO     my_hrs
    VALUES (13427,TO_DATE('03/01/2010 08:10','mm/dd/yyyy HH24:MI'),TO_DATE('03/01/2010 10:02','mm/dd/yyyy HH24:MI'),'321B');
    INSERT INTO     my_hrs
    VALUES (21543,TO_DATE('03/01/2010 14:07','mm/dd/yyyy HH24:MI'),TO_DATE('03/01/2010 16:30','mm/dd/yyyy HH24:MI'),'123A');
    INSERT INTO     my_hrs
    VALUES (22412,TO_DATE('03/01/2010 10:15','mm/dd/yyyy HH24:MI'),TO_DATE('03/01/2010 15:30','mm/dd/yyyy HH24:MI'),'321B');
    INSERT INTO     my_hrs
    VALUES (11976,TO_DATE('03/01/2010 17:00','mm/dd/yyyy HH24:MI'),TO_DATE('03/02/2010 02:30','mm/dd/yyyy HH24:MI'),'123A');
    INSERT INTO     my_hrs
    VALUES (34215,TO_DATE('03/01/2010 22:10','mm/dd/yyyy HH24:MI'),TO_DATE('03/02/2010 04:30','mm/dd/yyyy HH24:MI'),'321B');
    INSERT INTO     my_hrs
    VALUES (24789,TO_DATE('03/02/2010 13:00','mm/dd/yyyy HH24:MI'),TO_DATE('03/05/2010 02:30','mm/dd/yyyy HH24:MI'),'123A');
    INSERT INTO     my_hrs
    VALUES (31542,TO_DATE('03/02/2010 21:30','mm/dd/yyyy HH24:MI'),TO_DATE('03/04/2010 10:30','mm/dd/yyyy HH24:MI'),'321B');Based on my sample data above, these are the results I want to see:
    WORKSTATION     DATE          HRS_IN_USE
    123A          3/1/2010     14.96667
    321B          3/1/2010     8.95000
    123A          3/2/2010     13.50000
    321B          3/2/2010     7.00000
    123A          3/3/2010     24.00000
    321B          3/3/2010     24.00000
    123A          3/4/2010     24.00000
    321B          3/4/2010     10.50000
    123A          3/5/2010     2.50000
    321B          3/5/2010     0.00000Is this possible? (Please note, if the workstation was not used on a particular day, I want it to show 0 hours for that workstation for that day). Another thing to note is that I'm working with Oracle 8i.
    Thanks in advance for the help!

    Thanks, Frank, your explanation helped. My main problem was just that I couldn't picture what that line of the query was doing, even working from the inside out. I learn better through visual and hands-on methods, so to really understand, I had to look at the cross-join of a and h and go line by line. (In case there's anybody who looks at this post in the future and learns like I do, I've posted that data below).
    This definitely solves my problem!
    >
    By the way, this query is full of things that could be done better in later versions of Oracle. Generating table a is just one of them. Starting in Oracle 9, you can do a CONNECT BY query on dual to generate exacly how many rows you need. You never have to worry about an upper bound, and it's much faster than using ROWNUM. From time to time you might gently remind the people who decide these things that you're using a very old, unsupported version of Oracle, and that everyone could be more productive if you upgraded.
    >
    I could go on and on on this topic.... we have tried and continue to try to convince the powers that be to pay for the upgrades... if it were just Oracle that needed to be upgraded, we might actually have a chance at succeeding. As it is, ...ha.
    TABLE A (FROM SUB-QUERY)
    a_date          next_date
    3/1/2010     3/2/2010
    3/2/2010     3/3/2010
    3/3/2010     3/4/2010
    3/4/2010     3/5/2010
    3/5/2010     3/6/2010
    TABLE H (MY_HRS)          
    record_id     sdatetime     edatetime     workstation
    10000          2/28/2010 18:00     3/1/2010 5:30     123A
    12345          3/1/2010 8:00     3/1/2010 13:35     123A
    13427          3/1/2010 8:10     3/1/2010 10:02     321B
    21543          3/1/2010 14:07     3/1/2010 16:30     123A
    22412          3/1/2010 10:15     3/1/2010 15:30     321B
    11976          3/1/2010 17:00     3/2/2010 2:30     123A
    34215          3/1/2010 22:10     3/2/2010 4:30     321B
    24789          3/2/2010 13:00     3/5/2010 2:30     123A
    31542          3/2/2010 21:30     3/4/2010 10:30     321B
    CROSS-JOIN TABLE A WITH TABLE H                                             (and calculations done by the query below)     
    record_id     sdatetime     edatetime     workstation     a_date          next_date     LEAST (h.edatetime, a.next_date)     GREATEST (h.sdatetime, a.a_date)     GREATEST(TO_NUMBER(L-G),0)
    10000          2/28/2010 18:00     3/1/2010 5:30     123A          3/1/2010     3/2/2010     3/1/2010 5:30                    3/1/2010 0:00                    0.229166667
    10000          2/28/2010 18:00     3/1/2010 5:30     123A          3/2/2010     3/3/2010     3/1/2010 5:30                    3/2/2010 0:00                    0.00000
    10000          2/28/2010 18:00     3/1/2010 5:30     123A          3/3/2010     3/4/2010     3/1/2010 5:30                    3/3/2010 0:00                    0.00000
    10000          2/28/2010 18:00     3/1/2010 5:30     123A          3/4/2010     3/5/2010     3/1/2010 5:30                    3/4/2010 0:00                    0.00000
    10000          2/28/2010 18:00     3/1/2010 5:30     123A          3/5/2010     3/6/2010     3/1/2010 5:30                    3/5/2010 0:00                    0.00000
    12345          3/1/2010 8:00     3/1/2010 13:35     123A          3/1/2010     3/2/2010     3/1/2010 13:35                    3/1/2010 8:00                    0.23264
    12345          3/1/2010 8:00     3/1/2010 13:35     123A          3/2/2010     3/3/2010     3/1/2010 13:35                    3/2/2010 0:00                    0.00000
    12345          3/1/2010 8:00     3/1/2010 13:35     123A          3/3/2010     3/4/2010     3/1/2010 13:35                    3/3/2010 0:00                    0.00000
    12345          3/1/2010 8:00     3/1/2010 13:35     123A          3/4/2010     3/5/2010     3/1/2010 13:35                    3/4/2010 0:00                    0.00000
    12345          3/1/2010 8:00     3/1/2010 13:35     123A          3/5/2010     3/6/2010     3/1/2010 13:35                    3/5/2010 0:00                    0.00000
    13427          3/1/2010 8:10     3/1/2010 10:02     321B          3/1/2010     3/2/2010     3/1/2010 10:02                    3/1/2010 8:10                    0.07778
    13427          3/1/2010 8:10     3/1/2010 10:02     321B          3/2/2010     3/3/2010     3/1/2010 10:02                    3/2/2010 0:00                    0.00000
    13427          3/1/2010 8:10     3/1/2010 10:02     321B          3/3/2010     3/4/2010     3/1/2010 10:02                    3/3/2010 0:00                    0.00000
    13427          3/1/2010 8:10     3/1/2010 10:02     321B          3/4/2010     3/5/2010     3/1/2010 10:02                    3/4/2010 0:00                    0.00000
    13427          3/1/2010 8:10     3/1/2010 10:02     321B          3/5/2010     3/6/2010     3/1/2010 10:02                    3/5/2010 0:00                    0.00000
    21543          3/1/2010 14:07     3/1/2010 16:30     123A          3/1/2010     3/2/2010     3/1/2010 16:30                    3/1/2010 14:07                    0.09931
    21543          3/1/2010 14:07     3/1/2010 16:30     123A          3/2/2010     3/3/2010     3/1/2010 16:30                    3/2/2010 0:00                    0.00000
    21543          3/1/2010 14:07     3/1/2010 16:30     123A          3/3/2010     3/4/2010     3/1/2010 16:30                    3/3/2010 0:00                    0.00000
    21543          3/1/2010 14:07     3/1/2010 16:30     123A          3/4/2010     3/5/2010     3/1/2010 16:30                    3/4/2010 0:00                    0.00000
    21543          3/1/2010 14:07     3/1/2010 16:30     123A          3/5/2010     3/6/2010     3/1/2010 16:30                    3/5/2010 0:00                    0.00000
    22412          3/1/2010 10:15     3/1/2010 15:30     321B          3/1/2010     3/2/2010     3/1/2010 15:30                    3/1/2010 10:15                    0.21875
    22412          3/1/2010 10:15     3/1/2010 15:30     321B          3/2/2010     3/3/2010     3/1/2010 15:30                    3/2/2010 0:00                    0.00000
    22412          3/1/2010 10:15     3/1/2010 15:30     321B          3/3/2010     3/4/2010     3/1/2010 15:30                    3/3/2010 0:00                    0.00000
    22412          3/1/2010 10:15     3/1/2010 15:30     321B          3/4/2010     3/5/2010     3/1/2010 15:30                    3/4/2010 0:00                    0.00000
    22412          3/1/2010 10:15     3/1/2010 15:30     321B          3/5/2010     3/6/2010     3/1/2010 15:30                    3/5/2010 0:00                    0.00000
    11976          3/1/2010 17:00     3/2/2010 2:30     123A          3/1/2010     3/2/2010     3/2/2010 0:00                    3/1/2010 17:00                    0.29167
    11976          3/1/2010 17:00     3/2/2010 2:30     123A          3/2/2010     3/3/2010     3/2/2010 2:30                    3/2/2010 0:00                    0.10417
    11976          3/1/2010 17:00     3/2/2010 2:30     123A          3/3/2010     3/4/2010     3/2/2010 2:30                    3/3/2010 0:00                    0.00000
    11976          3/1/2010 17:00     3/2/2010 2:30     123A          3/4/2010     3/5/2010     3/2/2010 2:30                    3/4/2010 0:00                    0.00000
    11976          3/1/2010 17:00     3/2/2010 2:30     123A          3/5/2010     3/6/2010     3/2/2010 2:30                    3/5/2010 0:00                    0.00000
    34215          3/1/2010 22:10     3/2/2010 4:30     321B          3/1/2010     3/2/2010     3/2/2010 0:00                    3/1/2010 22:10                    0.07639
    34215          3/1/2010 22:10     3/2/2010 4:30     321B          3/2/2010     3/3/2010     3/2/2010 4:30                    3/2/2010 0:00                    0.18750
    34215          3/1/2010 22:10     3/2/2010 4:30     321B          3/3/2010     3/4/2010     3/2/2010 4:30                    3/3/2010 0:00                    0.00000
    34215          3/1/2010 22:10     3/2/2010 4:30     321B          3/4/2010     3/5/2010     3/2/2010 4:30                    3/4/2010 0:00                    0.00000
    34215          3/1/2010 22:10     3/2/2010 4:30     321B          3/5/2010     3/6/2010     3/2/2010 4:30                    3/5/2010 0:00                    0.00000
    24789          3/2/2010 13:00     3/5/2010 2:30     123A          3/1/2010     3/2/2010     3/2/2010 0:00                    3/2/2010 13:00                    0.00000
    24789          3/2/2010 13:00     3/5/2010 2:30     123A          3/2/2010     3/3/2010     3/3/2010 0:00                    3/2/2010 13:00                    0.45833
    24789          3/2/2010 13:00     3/5/2010 2:30     123A          3/3/2010     3/4/2010     3/4/2010 0:00                    3/3/2010 0:00                    1.00000
    24789          3/2/2010 13:00     3/5/2010 2:30     123A          3/4/2010     3/5/2010     3/5/2010 0:00                    3/4/2010 0:00                    1.00000
    24789          3/2/2010 13:00     3/5/2010 2:30     123A          3/5/2010     3/6/2010     3/5/2010 2:30                    3/5/2010 0:00                    0.10417
    31542          3/2/2010 21:30     3/4/2010 10:30     321B          3/1/2010     3/2/2010     3/2/2010 0:00                    3/2/2010 21:30                    0.00000
    31542          3/2/2010 21:30     3/4/2010 10:30     321B          3/2/2010     3/3/2010     3/3/2010 0:00                    3/2/2010 21:30                    0.10417
    31542          3/2/2010 21:30     3/4/2010 10:30     321B          3/3/2010     3/4/2010     3/4/2010 0:00                    3/3/2010 0:00                    1.00000
    31542          3/2/2010 21:30     3/4/2010 10:30     321B          3/4/2010     3/5/2010     3/4/2010 10:30                    3/4/2010 0:00                    0.43750
    31542          3/2/2010 21:30     3/4/2010 10:30     321B          3/5/2010     3/6/2010     3/4/2010 10:30                    3/5/2010 0:00                    0.00000
    (Then, the query sums up the last column in the "table" above, grouped by a_date and workstation).

  • Date Difference Calculation in BSO Cube

    Hello,
    need help with Date Calc
    I have a Dim. Called Inv Date and another Dim. Check Date( which is Time Dim.)
    I will like to do this calculation Inv Date - Check date and store the difference in a Measure member called days outstanding
    This should return how many days difference between both dates.
    will really appriciate if some one could help.
    thkx
    mits
    Edited by: user12527998 on Jan 28, 2010 1:43 PM

    Hi,
    I always find a post by John Booth's a useful guidance when you are wanting to run calculations with dates, have a read at :- Calculations with dates
    If you are using Version 11 you also have a look at the new date functions e.g. @DATEDIFF - http://download.oracle.com/docs/cd/E12825_01/epm.111/esb_techref/calc_datediff.htm
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • Date difference calculation

    Hello Everyone,
    We need to calculate a day difference between two days. There is many suggestions about using the following approach:
    (date1.getTime() - date2.getTime())/86400000.
    This seems to work until we hit a Daylight Savings Time issue and nobody seems to talk about that. When in April, for example, we get 1 hour less then the result of the calculation above will not be the whole number. Well, we can use Math.ceil() function for that. Then, in October, we get 1 hour back so now we have to use Math.floor() function to get the right result.
    Does anybody have any idea as to when to use one or another. I was thinking of using modulus division. If the result is not equal to zero then we have to apply one of those functions. The question now is, how to identify which function to apply? Or is there any other, less cumbersome way to properly get day difference between two dates?
    Any help will be greatly appreciated.
    Thanks,
    Yourii

    I think i figured out how to calculate the difference in days with Daylight Savings Time changes. Here is the code:
         * This method returns difference in days between two Dates passed in.
         * It identifies Daylight Savings Time changes and automatically
         * adds or substracts one hour when needed ...
         private int dayDifference(java.util.Date date1, java.util.Date date2) {
         final long M_SECS_PER_DAY = 24*60*60*1000;
         final long M_SECS_PER_HOUR = 60*60*1000;
         long days = (date1.getTime() - date2.getTime());     
         if (days%M_SECS_PER_DAY != 0) {
         if ((days + M_SECS_PER_HOUR)%M_SECS_PER_DAY == 0) {
         System.out.println("Adding one hour ...");
         days += M_SECS_PER_HOUR;
         } else {
         System.out.println("Substracting one hour ...");
         days -= M_SECS_PER_HOUR;
         } else {
         System.out.println("No alterations made ...");
         return (int)(days / M_SECS_PER_DAY);
    Let me know what you think ...

  • Date difference calculation with user input variable

    Hi,
    I have the following requirement in BEx:
    The user inputs a date value and I have to calculate the difference between the date entered by the user with the Due Date in the cube, to determine the number of backlog days. Basically, I need to calculate Past Due in number of days.  I need to display the Amount due for the Time buckets like 1 -10 days, 11 -30 days.
    The report output has to be in the format below:
    Columns:
    1 u2013 10 days Past Due      $100.00
    11 u2013 30 days Past Due    $15.00
    Rows:
    Customer#    
    The cube has data from Jan 2005 to June 2008.
    For Eg:   User Input Date =   04/30/2008.
    It should compare the input date to the due date for each record in the cube.
    Any suggestions are appreciated.

    Hi Kumar,
    We have developed simar reports in our previous projects.
    You need to follow the following steps.
    1. Create a new restricted key figure globally on Past Due $100. Restriction details I will let you know in the ensuing steps.
    2. Create another restricted key figure globally on Past Due $15. Restriction details I will let you know in the ensuing steps.
    3. Create a Z varuable on Calday and offset it -1 (use the button next to exclude button).
    4.Create another Z varuable on Calday and offset it -10 (use the button next to exclude button).
    5. Create another Z varuable on Calday and offset it -11 (use the button next to exclude button).
    6. Create another Z varuable on Calday and offset it -30(use the button next to exclude button).
    7 Restrict the RKF past due 100$ (defined in sl 1)between the variable range defined in 3 and 4.
    8. Restrict the RKF past due 15$ (defined in sl 2) between the variable range defined in 5 and 6
    Now drag and drop those two RKF to column and you will get the desired result in C1 and C2 as follows:
    Columns:
    C1 :1 u2013 10 days Past Due $100.00
    C2 :11 u2013 30 days Past Due $15.00
    If the above info serves your purpose, please reward me with the point.
    Regards,
    Subha

  • Date difference calculation help needed

    Hi,
    I have a form with a date field and one text field which is hidden..in case the date field value is less than the current date minus 3 years then the text field should display else not. Please advice what logic/code can be used.
    Any suggestions would be highly appreciated !!
    Thanks
    Kapil

    In the mean time, a couple of stylisitc suggestions:
    if(start.getTime().before(end.getTime()) == true)
    // == true is redundant and cluttersome
    if(start.getTime().before(end.getTime()))
    Long L = new Long(diff);
    return L.intValue();I'd suggest returning a long, rather than an int. If you insist on returning an int, because you're sure that the number of days will never be more than Integer.MAX_VALUE, then add an assertion that its not.
    assert diff <= Integer.MAX_VALUE : diff + " too big";The Long is overkill. If you do have a small enough value, just do return (int)diff;

  • Xcelsius doesn't display the date difference in Preview

    Hi,
    Im using the Xcelsius Enterprise 2008 and I use XML connectivity for the source. I would like to do some date difference calculation on my spread sheet. But the result of the date difference does no appear on the Preview for some reason. My XML file has got the date format dd/mm/yyyy hh:mm. I tried to convert the date to number format by multiplying the date by 1. When I do this the result appears correctly as I want on the Preview, but the problem is when there is a first refresh, the date difference shows a error value "#Value". I tried to enable XML Map Properties -> When refreshing or importing data:
    1. Overwrite existing data with new data
    2. Append new data to existing XML lists.
    But still not of any use. Could any one please give me a tip to resolve my problem.
    Many thanks in advance.
    Priya

    Hi Priya
    Can you please tell me what formula are you using to take difference in dates?
    Just to tell you as a point of information, Xcelsius is capable to handle very limited set of formulas. In spreadsheet you will see the formula working perfectly fine but right after hitting preview button you wont be able to see values calculated by certain formulas in Excel. So, its always good to use less and very basic formulas.
    Regards,
    Waqas

  • Date difference based on the conditions is giving wrong values

    Hi,
    In creating the formula for conditional date difference calculation,
    i.e.,
    if (sto date is 0) then (act date - mat rel date) else (sto date is not equal to 0) then (sto date - mat rel date)
    So I tried with,
    (sto date == 0) * (act date - mat rel date) + (sto date <> 0) * (sto date - mat rel date)
    But I am getting a wrong value even with decimals as days can't be in decimals. Please suggest where I am going wrong in calculation.
    Thanks,
    Best Regards,
    Darshan MS

    Hi Darshan,
    First of all, were the dates converted already to keyfigure?
    If not, please check:
    Convert a Characteristic into a Key Figure (BEx)
    If they were already converted, try this:
    (sto date == 0) * (act date - mat rel date) + (sto date - mat rel date)
    Regards,
    Loed

  • Date difference problem.....

    Hi,
    I am calculating the date difference with the Formula variables.
    My requirement is to find the rocords, where date difference is 0.
    , Means same date.
    But I am facing one problem while testing the query.
    If for the two date , if both the columns are not having any value,
    it contains # , and if I calculate the diffence of this,
    This is also coming as 0 in the Date difference column.
    Can somebody let me know how to rectify/avoid this situation?
    Thanks , Jeetu

    Hi Jeetu,
    According to your requirement, if record is there, there should be at leaset one date value say "Starting Date".
    If "ending date" value is blank, the formula returns a junk/garbage value.
    If both the date values are available, the formula returns the number of days corectly.
    But, both the date values are blank, there should not be any record in such case. If you see this case in your data base,
    that can be either wrong data record or you need to exclude such condition from your query.
    Thanks,
    Kiran.

  • Date duration calculation in the BLS

    All,
    We are using MII 12.0.6
    I am looking at a very peculiar behavior while calcualting the date difference between 2 dates.
    For ex. the following expression: 
    (datediffminutes(datetoxmlformat("2010-3-21 14:06:30 ", "yyyy-MM-dd hh:mm:ss"), datetoxmlformat("2010-05-24 08:14:54","yyyy-MM-dd hh:mm:ss")))/60
    yields 1530.13 as the result(this is the correct evaluation) when tested from within the Link editor (clicking the evaluate button).
    Now saving this transaction and giving the value of the above expression to an output param followed by calling this trx from an Xacute query yields 1529.13 as the result (I hr difference than above).
    I have tested this with a few more dates going as far back as Dec 2009 yielding the same one hour difference.
    On the other hand for any start date in May 2010 yields a correct result even when called from an Xacute query.
    I tested this  in a 12.0.2 system and found this behavior absent as in all was working as expected.
    Has anyone come accross this before?Do you know if the latest patch has this fixed?
    Just to cross check can anyone giive this a try in their 12.0.6 or higher system and report back?
    Thanks a lot for your help.
    Kind Regards
    Udayan

    Hi Udayan,
    Please open a ticket.  It sounds like a bug, although a few years back there was a problem with one of the java packages and Daylight Savings Time.  If you search this forum for all time, you will find some of the postings. 
    Since there have been changes to when Daylight Savings Time start and ends, it is likely related and could possibly be java related instead of MII.  I doubt it, but it is possible. 
    Edit:
    A little more research turned up differences in how Daylight Savings Time is calculated in different countries/continents.  Coincidentally, the US started on March 14th this year while the European Union started on March 28th (this date sounds familiar).  Not sure what timezone, you are in, but you may want to play around with the timezone settings for your computer to see if the error is consistent with US vs European timezones (or wherever you happen to be located).
    [Daylight Savings Times around the world|http://www.worldtimezone.org/]
    Thanks,
    Mike
    Edited by: Michael Appleby on May 25, 2010 12:41 PM

  • Max - min date difference

    Hello Guys, how are you.
    I'm facing a problem whan I try to get the difference between the max and min date of a KF.
    Mi requirement is like this:
    Min Date Max Date Difference (max - min)
    20/06/2008 26/06/2008 6
    My query result is like this:
    min date max date difference
    20/06/2008 26/06/2008 0
    It seems like the formula for getting the difference between the other 2 formulas is not working, because I'm using the function of aggregattion, based on some characteristic, in order to have the max value of the date in one formula, and then have the min value of the date in other formula (the KF store for date is the same, that's the reason i have to use aggregation in order to calculate min and max value).
    Then I have a third formula to calculate the difference between the min value and the max value, but it seems that its not working because of the aggregation.
    Can you please give me some ideas of how can i obtain the desire result.
    THANKS IN ADVANCE

    Hi Carmonia,
    (a) If you want to perform calculations on DATE and if both dates are characteristic infobjects, then you can go for Formula Replacement Path.
       1. Create a New Formula or CKF and then select a Formula Variable. Right click and select New Varaible.
       2. Now create a Variable for one of the Characteristic of Date type with  processing type Formula - Replacement path. Select Replace with 'Key' and Dimension as 'Date'. Similarly create another formula replacement variable for another characteristic.
       3. Now you can taken both these variables in calculations(such as A-B).
    (b) If you are using key figure for the dates, then try by using DATE function in Data Functions of New Formula.
    Example: DATE(kfig_MaxDate)-DATE(kfig_MinDate). Also try DATE(kfig1_MaxDate-kfig2_MaxDate).
    ***Assign points if useful.
    Thanks,
    Sasi

  • Delivery date getting calculated wrongly in delivery created via VL10D

    Hi Gurus,
    We have a strange issue, where in delivery date is getting calculated wrongly for replenishment delivery created via VL10D.
    When we are creating via VL10D , delivery date is getting the additional 30 days from MaxDlvCrteDate . With initial investigation i see that VL10D has delivery creation profile 0101 for which no of days maintained in max delv creation date is 30 .
    I assume that the delivery date is getting the additional days from delivery creation profile felid no of max delv creation date .
    I have created the delivery on 24.03.2011, as per the route no of TL time is 9 days , So Ideally the delivery date should be 04.04.2011 , however system has calculated it as 23.04.2011
    Delivery no             No of days in MaxDlvCrteDate                        Delivery  date
    213443158                           30                                                       23.04.2011
    If I create the delivery for the same PO using t-code VL10B, then delivery date is calculating correctly.
    Not sure why system behavior is strange.
    Please help me with your inputs to resolve the issue..
    Thanks in advance

    Please request one Abaper  to solve this problem.
    You cannot due nothing as the problem is in Code.
    Regards
    William

  • SAP COPA Delivery and billing date difference

    Dear gurus,
    I am new to COPA and going on a COPA project.
    Here is one question that I have been searching answer for.
    At the month end reconciliation of FI COPA data, there could be a situtaion where the SD delivery takes place this month but the billing for the same happens next month. under this circumstance,
    1. how would a busness like to see the data?
    2. Is there a way to reconcile the data where there is such date difference to get the correct report?
    regards
    Roy

    Hi Roy
    This is often a problem and causes FI/COPA to be out of synch....
    However, please note that, this situation can also be a genuine one due to legal restrictions.. In some countries, you can not recognize revenue till customer gives you Proof of Delivery (POD)... In such cases, the PGI cost hits P&L in Month X and revenue hits P&L in Month X+1
    To avoid this situation, you have 2 options....Both are tried and tested approaches
    1. Use Exit RV60AFZB and write ABAP code saying that billing month cant be different than PGI month... This approach can be used if you are not bound by the legal restrictions I said above
    2. Another approach is to use accrual keys in your SD pricing procedure.. (Ask your SD guy to do this)
    a. At PGI: The accounting entry would be
    Stock issued, but not Billed a/c ........... Dr (This is also a balance sheet account)
    Stock /ac ............................................Cr (This is a Balance sheet acount)
    b. During Billing, the entry would be
    Customer .................................. Dr
    Revenue ....................................Cr
    COGS ..........................................Dr
    Stock issued, but not Billed a/c.....Cr
    This way, COGS and Revenue are both accounted in same month
    BR,Ajay M

Maybe you are looking for

  • Weblogic server performance is very slow and memory consumption is 99%

    I am facing one critical issue with the weblogic server.. The server performance is very slow and one of the process is consuming more that 99% of the memory. Bouncing the server is not resolving the issue. Can see the memory usage below... Tasks: 13

  • Field NAme and Table Name

    Hi All, I got some output values from the legacy system with me but need to know whats the actual field name and table name to which i need to transfer these values. How can i do it, since which theres is not field name or despcription given for the

  • Customer service and new ipod issues

    i have called customer service 3 times and have been put on hold for about an hour in total, all asking me to wait for the senior adviser. i was told in my last call yesterday that the senior adviser will call me when he has time. from the service i'

  • Lost all my music on IPhone 4

    Hi all...I'll try to set the scene as quickly as possible I originally used Itunes and Iphone on computer #1 I bought a new computer #2, and set up my old computer in my sons room Computer #1 developed a problem with connecting to the internet, if I

  • Not able to load master data

    HI Friends, I am not able to load data in master data even after deleting the master data. when i am schedule then the data is not even load in PSA , I am using the SRM as source system, The SRM is refreshed every quater so we need to re load the dat