Calculate the date difference on essbase 9.3

Hi Everbody,
I want to calculate the difference between 2 date in essbase 9.3. Is any one did this practice ?
I have done this but that is not a better way. so please share your thought with me.
Regards
Vikram Singh

Hi,
DateDiff function returns the difference (number) between two input dates in terms of the specified date-parts, following a standard Gregorian calendar.
Syntax
DateDiff ( date1, date2, date_part )
date1+ is the number representing the input date between January 1, 1970 and Dec 31, 2037. The number is the number of seconds elapsed since midnight, January 1, 1970. To retrieve this number, use any of the following functions: Today(), TodateEx(), GetFirstDate(), GetLastDate(), DateRoll().
Date-time attribute properties of a member can also be used to retrieve this number. For example,
Product.currentmember.[Intro Date] returns the product introduction date for the current product in context.
[Cola].[Intro Date] returns the product introduction date for Cola.
date2+ A second input date. See date1.
date_part+ Defined time components as per the standard calendar.
DP_YEAR - Year of the input date.
DP_QUARTER - Quarter of the input date.
DP_MONTH - Month of the input date.
DP_WEEK - Week of the input date.
DP_DAY - Day of the input date.
Edited by: Cnee on Jul 13, 2009 3:19 AM
Edited by: Cnee on Jul 13, 2009 3:20 AM

Similar Messages

  • How we calculate the date difference between two list in SharePoint 2010

    Hi friend's....I have two list first is list1. In this list i have two coulmn start_date and End_date. In second list2 i have two column HolidayName and Holiday_date. Now i want two find the number of day in list1 Excluding Weekend and Holiday_date(that
    column from list2). How i will do ..? Please help me dosto..

    Thanks for reply...
    I have done the date difference in list1. But i want to Exclude the Holiday_date form list2.
    I have list1 - Start_date , End_date, Number_of_day(Exclude weekend and Holiday_date between Start_date and End_date )
    list2 - HolidayName, Holiday_date
    Now how i will calculate the Number_of_day in first list.

  • Formula to calculate the date difference

    Hi Experts,
    I am having a requirement . where i need to create the query with difference between the two dates. like date1 and date2
    Now i have created a formula for this diff =date1 - date 2 now the client want that this operation has to b executed when date2 hold some value r else "diff" column has to  b blank.
    Regards

    KK,
    if (date_diff > 0) * date_diff.
    it will first check wheather data_diff >0 . Suppose its value is 5.
    now after that v r multiplying with date_diff ie 5 then the result will be 25 right ??
    --> No, if (date_diff > 0) is boolean operation return "0" or "1" only. if its true then 1 or 0.
    So: same example: if (date_diff > 0) * date_diff --> 1*5 = 5.
    Hope it Helps
    Srini

  • How to calculate the hour difference between two dates?

    hi all,
    how to calculate the hour difference between two dates?
    eg i trying this...
    ((TO_DATE(TO_CHAR(GRNi.reference_date_4,'hh24:mi'),'hh24:mi') -
    TO_DATE(TO_CHAR(NVL(GRNi.reference_date_3,SYSDATE),'hh24:mi'),'hh24:mi'))*24)*60 Act_Hr
    Reg.
    AAK

    Hi
    To break the diff between 2 dates into days, hours, minutes, sec -- you can use the following:
    select to_char( created, 'dd-mon-yyyy hh24:mi:ss' ),
    trunc( sysdate-created ) "Dy",
    trunc( mod( (sysdate-created)*24, 24 ) ) "Hr",
    trunc( mod( (sysdate-created)*24*60, 60 ) ) "Mi",
    trunc( mod( (sysdate-created)*24*60*60, 60 ) ) "Sec",
    to_char( sysdate, 'dd-mon-yyyy hh24:mi:ss' ),
    sysdate-created "Tdy",
    (sysdate-created)*24 "Thr",
    (sysdate-created)*24*60 "Tmi",
    (sysdate-created)*24*60*60 "Tsec"
    from all_users
    where rownum < 50
    HTH
    RangaReddy

  • How to calculate the time difference in answers

    Hi,
    I need to calculate the time difference in BI answers and I dont have the access to the repository. I have the data in the following format
    10/12/2005 7:24:19 PM 10/12/2005 7:32:04 PM
    10/12/2005 7:50:47 PM 10/12/2005 8:52:36 PM
    10/12/2005 7:54:23 PM 11/4/2005 10:47:32 PM
    10/12/2005 9:05:51 PM 10/12/2005 9:08:58 PM
    10/12/2005 9:07:42 PM 10/12/2005 9:14:47 PM
    10/12/2005 9:09:02 PM 10/12/2005 9:10:57 PM
    I need to get the elapased hours between these two columns. Please help me
    Thanks

    you can use beans or create a case when statement like:
    case
    when TimeStampDiff(SQL_TSI_Min, table.column1, table.column2 ) <= 60 then 1 else
    when TimeStampDiff(SQL_TSI_Min, table.column1, table.column2 ) > 60 and TimeStampDiff(SQL_TSI_Min, table.column1, table.column2 ) <= 90 then 1.5 else
    when TimeStampDiff(SQL_TSI_Min, table.column1, table.column2 ) > 90 and TimeStampDiff(SQL_TSI_Min, table.column1, table.column2 ) <= 150 then 2.5 else
    end

  • In AP invoice i need to make "Terms date " field to calculate the date automatically when i select the payment terms

    In AP invoice i need to make "Terms date " field to calculate the date automatically when i select the payment terms.
    How can i do this?

    Hi,
    You can select the Payment Term at PO Header Level.
    When you book an invoice, that Payment Term will automatically defaulted to Invoice.
    You can define Payment Term in AP.
    Payment terms have one or more payment terms lines, each of which creates one scheduled payment. Each payment terms line and each corresponding scheduled  payment has a due date or a discount date based on either a specific day of a month, such as the 15th of the month, or a number of days added to your terms date, such as 14 days after the terms date.
    Payment Terms (Oracle Payables Help)

  • 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

  • Using Numbers, can I calculate the date that will be eg 45 days ahead of a given date?

    Using Numbers, can I calculate the date that will be eg 45 days ahead of a given date?

    MWB,
    Certainly. Let's say that your given date is in B2. The date 45 days earlier can be found with:
    =B2 – 45.
    Almost seems too simple.
    Jerry

  • "D2008178" - FM to calculate the date of the x day in a year

    Hi all!
    I am looking for a FM to calculate the date of a certain day in the year.
    For example which date has the day 178 of the year.
    This has nothing to do with the factory calendar!!!
    Thanks a lot for your help
    CU
    Peter

    Hi Peter,
    Please check this funtion module "FIMA_DATE_CREATE".
    Sample code as follows:
    REPORT  ztest_vinay.
    DATA: w_date TYPE vtbbewe-dvalut.
    PARAMETERS: p_date TYPE vtbbewe-dvalut.
    CALL FUNCTION 'FIMA_DATE_CREATE'
      EXPORTING
        i_date                        = p_date  " Here you need to pass first day of the year
        i_calendar_days         = 178
    IMPORTING
        e_date                        = w_date.
    WRITE: w_date.
    Regards,
    Vinay
    Edited by: Vinay Kumar Amruth on Feb 18, 2009 2:52 PM
    Edited by: Vinay Kumar Amruth on Feb 18, 2009 3:01 PM

  • How to calculate the phase difference between two square wave (acquired from two channel in one DAQ)

    Hello everyone ,
     I need a quickly help that as below :
    I am trying use PCI-6220 to acquired six signals from one rotation encoder (channel A, channel B,channel Z ,and their non-signals) .The encoder out signals will be square wave and 4000pulses per revolution. I set it rotation at 300rpm speed. I need show every square wave of six out channels in waveform and measure the A-B phase difference to check if the value is correct (designed value should be 90deg) .
    I have no idea how to measure or calculate the phase difference of two square wave base on synchronizate to acquire these two square wave from two channel on the PCI-6620....
    Anyone can give a idea how to calculate the phase difference with two square wave ?
    Thank a lot and Thanks again...
    Tim

    Tim,
    Here is a simple rising edge detector for one channel.
    Lynn
    Attachments:
    Rising edge.vi ‏15 KB

  • How to calculate the Time difference between 2 dates

    HI All,
    I am using HR_hk_diff_btw_2_dates to calculate the employee service dates.
    For that i  am inputing his hire date and Term dates and Output format as '05' i am getting output perfectly....
    But problem is  whe i am inputting the employee hire date is Dec 1 2007 and Term date is
    March 31 2009 It is coming as 1 year 3 months  31 days instead of 1 year 4 months directly .......How could we make it make last date also working day and get the O/p as 1 year 4 months ?Please Advice..
    Regard
    sas

    1. FM for difference betwwen two times:SCOV_TIME_DIFF
    Import parameters               Value
    IM_DATE1                        2008-01-01
    IM_DATE2                        2008-01-01
    IM_TIME1                        10:00:00
    IM_TIME2                        11:30:00
    Export parameters               Value
    EX_DAYS                         0
    EX_TIME                         01:30:00
    2. SD_CALC_DURATION_FROM_DATETIME : Finds the difference between two date/time and report the difference in hours
    L_MC_TIME_DIFFERENCE : Finds the time difference between two date/time

  • How to calculate the month difference between two date char. in Query?

    Customers would like to see how many months passed between two date type of characteristics (e.g., the month difference between the current date and the scheduled delivery date in the record) and put the result into the column as KF. 
    We would have to grab the fiscal year/period kind of value and then do the subtraction, e.g., if the current date value is 2/28/2008 and the scheduled delivery date value in the record is 12/01/2007, the correct result should be 2 month difference between these two date values, but could someone here give us the technical light on how to make this happen in query design?
    Thanks and we will give you reward points for the correct anwsers!

    Hi Kevin,
    The Badi is RSR_OLAP_BADI.
    You can create an implementation using Transaction  SE18.
    The implementation is per cube and is defined in the filters.
    In the Implementation you have the following methods :
    1. Define : Here you will provide the Keyfigure you need as a virtual one.
    2. Initilialize : Any Init Function you want to do.
    3. Compute. This is called per datarecord and here you can cimpute your value.
    Hope this helps.
    Pralay Ahluwalia

  • Calculate the date diff

    Hi, The requirement is to calculate the diff between 2 date fields and display it. I could able to get the difference between the 2 date fields. But now the result column SHOULD DISPLAY the result ONLY if the 2 date fields have the date set ELSE it should be left blank(basically NULL shud be set to the result column in such cases).
    The formula which I have used to get the result is :
    (NOERR(date1)<>0 AND NOERR(date2)<>0)*(date1-date2).
    The above formula works fine and gives the result as desired except that it puts "0" even though the date fields doenst have a value.I have tried to use the ELSE part by giving "1/0" thinking it wud give me "#" but this didnt help me out anyway.
    Any inputs on this...

    Thanks for the response.
    That was an option which I also thought of and I wud use it only as a last rescue and trying if I can get some info to do it otherwise.
    The other option which I have in my mind is to just get this diff into the cube and this shud resolve but then again I hv to chg the BW structures and unnecessarily I wud be increasing the load to the cube.
    Any other option in Bex ...???

  • Calculate the date interval in days

    Hi all!
    I need your kind help.
    I have an oracle sql table.
    here is goes..
    TABLENAME: RACE
    DATE NAME
    11-JAN-12 JAMES
    12-JAN-12 JAMES
    14-JAN-12 JAMES
    17-JAN-12 JAMES
    22-JAN-12 JAMES
    01-FEB-12 JOHN
    11-FEB-12 JOHN
    13-FEB-12 JOHN
    14-FEB-12 JOHN
    28-FEB-12 JOHN
    01-MAR-12 JOHN
    HOW DO I Calculate the total date interval(difference) for James and John in days?
    for example in this case the total is 7 days for James(11-JAN-12 to 12-JAN-12 is 0 days and 12-JAN-12 to 14-JAN-12 is 1 day and 14-JAN-12 to 17-JAN-12 is 2 days) and 24 days for John
    The data for the date will be random and can be up to 60 difference dates and names so I will like to calculate for all different names.. Thanks!

    Can you explain in more detail why James should have 7 days?
    Difference in dates can be easily calculated (if you use the DATE datatype, that is) by simply subtracting them.
    Example:
    SQL> -- generating sample data:
    SQL> with race as (
      2  select to_date('11-JAN-12', 'dd-mon-yy') dt, 'JAMES' nm from dual union
      3  select to_date('12-JAN-12', 'dd-mon-yy'), 'JAMES' from dual union
      4  select to_date('14-JAN-12', 'dd-mon-yy'), 'JAMES' from dual union
      5  select to_date('17-JAN-12', 'dd-mon-yy'), 'JAMES' from dual union
      6  select to_date('22-JAN-12', 'dd-mon-yy'), 'JAMES' from dual union
      7  select to_date('01-FEB-12', 'dd-mon-yy'), 'JOHN' from dual union
      8  select to_date('11-FEB-12', 'dd-mon-yy'), 'JOHN' from dual union
      9  select to_date('13-FEB-12', 'dd-mon-yy'), 'JOHN' from dual union
    10  select to_date('14-FEB-12', 'dd-mon-yy'), 'JOHN' from dual union
    11  select to_date('28-FEB-12', 'dd-mon-yy'), 'JOHN' from dual union
    12  select to_date('01-MAR-12', 'dd-mon-yy'), 'JOHN' from dual
    13  )
    14  --
    15  -- actual query:
    16  --
    17  select max(dt)-min(dt) diff
    18  ,      nm
    19  from   race
    20  group by nm;
          DIFF NM
            29 JOHN
            11 JAMESHowever, that is not your desired resultset. We (at least: I) need a bit more explanation why James should have 7 as date difference...
    Also: DATE and NAME ar not suitable as column names.

  • How to calculate the data in bex

    Dear all,
                i have a service order no and it current active status  and it time stamp details in my query
    example
    sevice orer no  posting date name    current active status  active status date    part aging
    800000243      15.01.2009   shahina part despatched          A     17.01.2007  
    in my ods i have
    sevice orer no  posting date name    current active status  active status date    part aging
    800000243      15.01.2009   shahina part despatched          A    17.01.2007  
    800000243      15.01.2009   shahina part pending               x    16.01.2007  
    800000243      15.01.2009   shahina part for asp                 x    17.01.2007  
    i want to calulate the aging of part pending to part despatched
    17.01.2009   -   15-01.2009   = 2 days
    i want to display in my bex like this
    sevice orer no  posting date name    current active status  active status date    part aging
    800000243      15.01.2009   shahina part despatched          A     17.01.2007      2
    ( in bex report i want to display only active status )
    can any one help me please to solve this issue
    Regards
    shahina

    Hi vamsi talluri ,
      i working in crm reports ( service ) here i want to calulate the differance between the old status that is inactive status date to part despathed date
    sevice orer no  posting date name    current active status  active status date    part aging
    800000243      15.01.2009   shahina part despatched          A     17.01.2007  
    in my ods i have
    sevice orer no  posting date name    current active status  active status date    part aging
    800000243      15.01.2009   shahina part despatched          A    17.01.2007  
    800000243      15.01.2009   shahina part pending               x    16.01.2007  
    800000243      15.01.2009   shahina part for asp                 x    13.01.2007  
    i want to calulate the aging of part pending to part despatched
    17.01.2009   -   13-01.2009   = 4 days
    i want to display in my bex like this
    sevice orer no  posting date name    current active status  active status date    part aging
    800000243      15.01.2009   shahina part despatched          A     17.01.2007      4
    in bex i am dispaying only active satus but i want calculate diff bet active status which i am dispalying in the bex analyzer and old status whaer the data are available in sercice order ods
    please help me how to perform the calculation
    Regards,
    shahina..!
    ( in bex report i want to display only active status )
    can any one help me please to solve this issue
    Regards
    shahina..!
    Edited by: Shahina A on Jan 21, 2009 6:13 AM

Maybe you are looking for

  • DSL will not work after speed upgrade

    I ordered a speed upgrade (from 3 to 5 down) a couple weeks ago.   On Tuesday they confirmed that they completed the order but now the DSL will not work at all.   I have an old Westell B90 Infospeed DSL modem (branded as Bell Atlantic) and they swear

  • Itunes. How to convert wma to acc

    Hello, I am wondering how i can convert all my WMA files into ACC files. Itunes did do it automatically when 1st loaded to this computer, but i cancelled application, really stupid move on my part, and i have no idea how restart this process. Can any

  • Email PDF Documents

    I've been using Acrobat Reader for quite some time but am a Newbie with Adobe Acrobat's features. I need some information, if someone out there would be so kind. Once you create a PDF document, of lets say 10 pages, is it possible to email only CERTA

  • Third Party plug-in failure

    Hello, I'm not sure if I'm asking this question in the correct catagory, the site's a little difficult to manuver around so I apologize beforehand if this is the wrong section. Onto my issue, I attempted to install an older plug-in that was compatibl

  • Error Message. IE doesn't recognize webkit font, converts to arial

    MuseJSAssert: Error calling selector function:TypeError: 'undefined' is not a function (evaluating 'PIE.attach(this)') I get this error in IE only. Also, IE doesn't recognize my font and converts everything to Arial, so it's all bigger and bolder and