How to calculate the days between last movement of material till today date

Hello Experts,
Could someone help me please?
I have a key figure in the InfoCube 0IC_C03 witch contain the last date of movement of material.
(it is a key figure created in format date and contain the max value).
How can I to calculate the number of days between this date (last movement),  till today date (system date).
I need to show:
material........last movement.....days without movements.
xxxxxxxxxxx.....dd/mm/yyyy..........9999
Im trying to do this calculation in bex using variable formula but it doesn't work becouse current date (customer exit) brings sy-datum in format yyyymmdd and the kf-last-mov is in format number (I dont know what kind of number)
Thanks in advance,
Points are assured.
Regards,
Silvio Meurer.
Message was edited by:
        Silvio Meurer

Hi Parth,
Here we are using the version 7.0 and SP 10, I'm afraid I could not understand you. I Can't find the function DATE_DIFF (Where is it?)
I'm using the formula and it doesn't work. Coud you see the result is:
last movement date     Today date        result
02.04.2007                  20.070.625       19.337.856
18.05.2007                  20.070.625       19.337.810
the "today date" is from customer exit and the result is a strange number to me.
Could you help me?

Similar Messages

  • How to calculate the ratio between the maximum and minimum peaks of the two waves using two looping to find the value of SPO2?

    hello everyone,
    i'm rai from indonesia
    I have a final project about pulse oximetriy, I have some problems,
    how to calculate the ratio between the maximum and minimum peaks of the two waves using two while loops to calculate SpO2 ?
    My program image can be seen below predicament ?
    Attachments:
    spo2 akusisi data with filter lpf hpf smoot nilai max min ir merah.vi ‏249 KB
    spo2 akusisi data with filter lpf hpf smoot nilai max min ir merah.vi ‏249 KB

    Hi rai,
    I would appreciate it as kind of respect for forum participants if you would clean up your VI before uploading it (or images of its block diagram)…
    That being said:
    - Your inner while loops each run exactly twice. Replace them with FOR loops!
    - Lots of unneeded operations, mainly induced by ExpressVI usage. Is there a reason to convert to DDT and immediately convert back to 1D array?
    - You already calculate some Min/Max values. Ratio is just a division of two values…
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome

  • How to calculate the ratio between the maximum and minimum peaks of the two waves using two while loops?

    hello everyone,
    i'm rai from indonesia
    I have a final project about pulse oximetriy, I have some problems,
    how to calculate the ratio between the maximum and minimum peaks of the two waves using two while loops to calculate SpO2 ?
    My program image can be seen below predicament ?
    Attachments:
    spo2 akusisi data with filter lpf hpf smoot nilai max min ir merah.vi ‏249 KB

    Hi Rai,
    You should post this into the LabVIEW forum rather than Real-Time since this isn't a Real-Time application. Your post will see more replies in the LabVIEW forum. 
    As far as your question is concerned, you can write the max and min from the respective loops to a local variable to send the data out of the loops to a third loop or just do the calculation in one of the loops. This would be ideal if you're trying to do this while the loop is running. 
    -Jayk
    Applications Engineering
    National Instruments

  • How to Calculate the Time Between two days in ABAP

    Hi,
                  I have one scenario like i need to calculate the time between two days please can you suggest me.
    Thanks,
    Harinath

    Hi Peeleti,
                Check this code,
    DATA : DATE1 LIKE SY-DATUM VALUE '19830125',
           DATE2 LIKE SY-DATUM VALUE '20070219',
           DAYS1 TYPE I,
           WEEK1 TYPE I,
           MONTH1 TYPE I,
           YEAR1 TYPE I,
           C_YEARS1 TYPE I.
    CALL FUNCTION 'HR_99S_INTERVAL_BETWEEN_DATES'
    EXPORTING
      BEGDA           = DATE1
       endda           = DATE2
      TAB_MODE        = ' '
    IMPORTING
      DAYS            = DAYS1
      C_WEEKS         =
      C_MONTHS        = C_YEARS1
      C_YEARS         = C_YEARS1
      WEEKS           = WEEK1
      MONTHS          = MONTH1
      YEARS           = YEAR1.
      D_MONTHS        =
      MONTH_TAB       =
    *WRITE : / 'DAYS   = ', DAYS1,
            / 'WEEKS = ',WEEK1,
          /  'MONTHS = ', MONTH1,
          / 'YEARS   = ', YEAR1.
    Using this code you can calculate the No Of Days Between two dates. Based On days you will easily calculate the Hour. [  No of days * 24 ].
    Thanks.
    Reward If helpful.

  • MDX - how to calculate the sales between a certain period and the currentmember with a max date

    Hi all,
    1)I need to calculate the sales between W1 and the currentmember, but the max date should be W20. How can I solve this in MDX?
    MEMBER [Measures].[Q1 act.period to date sales] AS
    Sum(
    [Date invoice].[Bonus calendar - Week].[Bonus week of year].&[2015]&[1]
    [Date invoice].[Bonus calendar - Week].Currentmember
    *[CurrentSalesPeriod]
    ,[Measures].[Sales amount]
    This is the measure I have, I need to add the max date is W20. 
    2)Also, when I calculate the sales between [Date invoice].[Bonus calendar - Week].[Bonus week of year].&[2015]&[40] and the currentmember, for example being [Date invoice].[Bonus calendar - Week].[Bonus week of year].&[2015]&[20],
    he calculated the sales between this period. However, in theory this is not possible because W20 < 40. Is there any way I can put a constraint on this that he only calculates the sales if the currentmember is > the start period?
    Thanks in advance!

    Y, you can put a check on to determine if currentmember > start period.
    Firstly, your period keys are composite of year and period (indicated by the two ampersands in the fully qualified date above). If your period keys were non-composite (eg 201501) it would be a simple matter of 
    IIF([Date invoice].[Bonus calendar - Week].Currentmember.properties("key") > [Date
    invoice].[Bonus calendar - Week].[Bonus week of year].&[2015]&[1].properties("key"),[Measures].[Sales
    amount],null)
    There are advantages of having two period attributes on the dimension, one with a fully unique
    key and the other with just the period of fy, but that's digressing.
    With your composite keys, you could use a calc like the following for the SUM()
    Sum(
    [Date invoice].[Bonus calendar - Week].[Bonus week of year].&[2015]&[1]
    [Date invoice].[Bonus calendar - Week].Currentmember
    *[CurrentSalesPeriod]
    ,IIF([Date
    invoice].[Bonus calendar - Week].Currentmember.parent.properties("key") +[Date
    invoice].[Bonus calendar - Week].Currentmember.properties("key") > [Date
    invoice].[Bonus calendar - Week].[Bonus week of year].&[2015]&[1].parent.properties("key")+[Date
    invoice].[Bonus calendar - Week].[Bonus week of year].&[2015]&[1].properties("key"),[Measures].[Sales
    amount],null))
    Richard

  • How to Calculate the Space between two Characters in GDI + ?

    I am Drawing the set of characters in Graphics, by Calculating the points using GraphicsPath for each Character. I Need to know how to calculate the distance should be given between the two characters?
    I am using this code to generate points
    PointF [] pnts;
    var p=new GraphicsPath();
    path.AddString("A","Arial",(int)FontStyle.Regular,50,new pointF(0f,0f),StringFormat.GenericDefault);
    Matrix m=new Matric(1,0,0,1,0,0);
    path.Flatten(m,1,0f);
    pnts=path.pathpoints;
    i am getting the points for all characters using the above code.
    Now i am combining the two character Using the points generated by the above code.  Eg "AB"
    Help me to calculate the the character space should be given between two characters?
    Thanks in Advance...

    Hi,
    this link can assist you:>
    Professional C# - Graphics with GDI+ 
    Mark as answer or vote as helpful if you find it useful | Ammar Zaied [MCP]

  • How to count the days between Date Range using OO ABAP?

    hi experts,
            i want to count the days between Date Range using OO ABAP for that  which class and method  can i use?.
    Thanks,
    Mahesh.

    Not sure I understand the requirement for it to be OO, but you could always write your own (i.e. use this):
    REPORT zz_date_diff.
    CLASS date_diff DEFINITION.
      PUBLIC SECTION.
        METHODS diff IMPORTING     i_date_fm TYPE d
                                   i_date_to TYPE d
                     EXPORTING     e_days    TYPE i.
    ENDCLASS."
    CLASS date_diff IMPLEMENTATION.
      METHOD diff.
        e_days = i_date_to - i_date_fm.
      ENDMETHOD."
    ENDCLASS."
    DATA: g_ref TYPE REF TO date_diff,
          g_days  TYPE i,
          g_date_fm  TYPE d VALUE '20080101',
          g_date_to  TYPE d VALUE '20090101'.
    START-OF-SELECTION.
      CREATE OBJECT g_ref.
      CALL METHOD g_ref->diff
        EXPORTING
          i_date_fm = g_date_fm
          i_date_to = g_date_to
        IMPORTING
          e_days    = g_days.
      WRITE g_days.

  • How to calculate the time between start trigger,first scan and first A/D in DAQ

    Environment: Labview 6.1, N6052E DAQ board(max scan rate=333KHz, max channel rate=333KHz, settling time=3.5usec+1LSB)
    I am using external scan clock 10K scan/s collecting data on 16 AI channels, and external channel clock 200KHz.
    Could show me how to calculate the time betweent he start trigger, the first scan and the first A/D conversion?
    Thanks

    I read the one you give to me. still cannot work out. I am using Labview 6.1 DAQ vi, including AI config.vi. clock config.vi, AI control.vi, AI read.vi, working on colect data on 16 AI channels. So I belong to SCAN function and external scan and sampling timing, right?
    But it says the T1 and T2 are determined by external signals. How can I calculate that?
    T1=1/10KHz or T1=1/160Khz?
    T2=1/200KHz?
    Is the above correct?

  • Calculate the days between today and specific day.

    I'm trying to calculate the number days between Today and some specific date in the future using SharPoint Designer (XSL). This is what I'm using:
    <xsl:value-of select="number(ddwrt:DateTimeTick(ddwrt:GenDisplayName(string(@Due_Date))))- number(ddwrt:DateTimeTick(ddwrt:GenDisplayName(string($Today))))" />
    e.g. 23 days >>>> 634948416000000000 ticks
    This works perfectly while I'm in SPDesigner itself, but once I try to see it in the browser it shows the number of days in "Tick Numbers". Is there a way I can fix this? I've been looking all over the internet and I haven't found any really good answer.
    thanks!

    Thanks for the quick response Marc.
    I've no experience of using momentsJs with SharePoint lists and I need to be able to get this up and running pretty quickly. I guess you need some coding experience to use it?
    I'm thinking that there should be a way to do this in SPD with something similar to this from another site, but with the conditions placed on the source field (Planned end Date)  instead of the current date. 
    not((ddwrt:DateTimeTick(ddwrt:GenDisplayName(string($thisNode/@Plan_x0020_Ende)))
    >=
    (ddwrt:DateTimeTick(ddwrt:Today())-(7*24*60*60*1000*10000)))
        and
    (ddwrt:DateTimeTick(ddwrt:GenDisplayName(string($thisNode/@Plan_x0020_Ende)))
    <=
    (ddwrt:DateTimeTick(ddwrt:Today())+(7*24*60*60*1000*10000))))
    and
    not((ddwrt:DateTimeTick(ddwrt:GenDisplayName(string($thisNode/@Ist_x0020_Ende)))
    >=
    (ddwrt:DateTimeTick(ddwrt:Today())-(7*24*60*60*1000*10000)))
        and
    (ddwrt:DateTimeTick(ddwrt:GenDisplayName(string($thisNode/@Ist_x0020_Ende)))
    <=
    (ddwrt:DateTimeTick(ddwrt:Today())+(7*24*60*60*1000*10000))))

  • How to calculate the difference between values in a custom PSObject?

    If I have a PSObject (created from an imported CSV) that has data like the following:
    date,Total size of files uploaded
    03-17-2014 09:08,1293334574547
    03-17-2014 09:10,1293335326912
    03-17-2014 09:13,1293336523562
    03-17-2014 09:14,1293337541156
    03-17-2014 09:16,1321031223511
    03-17-2014 09:16,1321032156844
    This CSV will have lines added to it, so the total number of lines will vary.
    Is there a way that two most recently added values and calculate the difference of the "Total size of files uploaded" values? 
    I have the columns properly cast as datetime and
    int64 already using this:
    $csv = Import-Csv $csvLocation |
    Where-Object { ![string]::IsNullOrWhiteSpace($_.datetime) } |
    Foreach-Object {
    $_.datetime = $_.datetime -as [datetime]
    $_."Total size of files uploaded" = $_."Total size of files uploaded" -as [int64]
    $_ }
     I tried searching thinking surely there must be someone else who has tried to do this" but I cannot find anything. I am just not sure how to approach this problem. Any help would be appreciated!

    Assuming all of your records are sequential with the last two being the most recent you could use this:
    $csv = Import-Csv $csvLocation |
    Where-Object { ![string]::IsNullOrWhiteSpace($_.datetime) } | select -last 2
    Foreach-Object {
    $_.datetime = $_.datetime -as [datetime]
    $_."Total size of files uploaded" = $_."Total size of files uploaded" -as [int64]
    $_ }
    $Difference = $csv[1]."Total size of files uploaded" - $csv[0]."Total size of files uploaded"
    This uses the index of the imported array and just the last two records.  Note that this will give a negative value if the total is less in the later record.  Hope this helps!
    You could also use 
    | sort datetime -ascending | select -last 2
    if they aren't already in order...

  • How to calculate the difference between two dates?

    Hello,
    I would like to write some code which figures out how many days are between the Date_of_change (which is of datatype DATE, length 7 and of format DD-MON-YY) and the current date today. Then if the difference between Date_of_change and the current date is greater that 30 days for example then I would like to delete that record from the database.
    Thanks
    Doug

    Something like this should work:
    SQL> select * from emp order by hiredate ;
         EMPNO ENAME      JOB              MGR HIREDATE           SAL       COMM     DEPTNO
          7934 MILLER     CLERK           7782 21-OCT-2005       1300                    10
          7902 FORD       ANALYST         7566 22-OCT-2005       3000                    20
          7900 JAMES      CLERK           7698 23-OCT-2005        950                    30
          7876 ADAMS      CLERK           7788 24-OCT-2005       1100                    20
          7844 TURNER     SALESMAN        7698 25-OCT-2005       1500          0         30
          7839 KING       PRESIDENT            26-OCT-2005       5000                    10
          7788 SCOTT      ANALYST         7566 27-OCT-2005       3000                    20
          7782 CLARK      MANAGER         7839 28-OCT-2005       2450                    10
          7698 BLAKE      MANAGER         7839 29-OCT-2005       2850                    30
          7654 MARTIN     SALESMAN        7698 30-OCT-2005       1250       1400         30
          7566 JONES      MANAGER         7839 31-OCT-2005       2975                    20
          7521 WARD       SALESMAN        7698 01-NOV-2005       1250        500         30
          7499 ALLEN      SALESMAN        7698 02-NOV-2005       1600        300         30
          7369 SMITH      CLERK           7902 03-NOV-2005        800                    20
    14 rows selected.
    SQL> delete from emp where hiredate < sysdate - 30 ;
    10 rows deleted.
    SQL> select * from emp order by hiredate ;
         EMPNO ENAME      JOB              MGR HIREDATE           SAL       COMM     DEPTNO
          7566 JONES      MANAGER         7839 31-OCT-2005       2975                    20
          7521 WARD       SALESMAN        7698 01-NOV-2005       1250        500         30
          7499 ALLEN      SALESMAN        7698 02-NOV-2005       1600        300         30
          7369 SMITH      CLERK           7902 03-NOV-2005        800                    20
    4 rows selected.
    SQL>

  • How to calculate the difference between intdate and getdate

    Hi,
    My requirement is to get the data for all the claims where the difference between transactiondate and getdate() should be less than or equal to 7 which means any claims that happened in the past week.
    So, my query would be something like this
    select * from claims
    where transactiondate-getdate < 8
    But my transactiondate is in int format such as 20150331 and getdate would be in the format of 2015-03-31. Can someone please help me on how can i achieve the difference between these 2 date formats in the where clause.
    Please let me know if you have any questions or if i am unclear.
    Thanks

    Hi SqlDev12,
    Please find the below condition in your query,hope it would help you
    DATEDIFF(DD,CAST(CAST(TransactionDate
    AS
    VARCHAR)
    AS
    DATETIME),GETDATE())
    < 8
    Thanks & Regards,
    Praveena.

  • How to calculate the days with a date field

    I need to make a query that shows the number of flown days at the end of the month for the whole fleet, given a date that represents one day within that month.
    I would appreciate all the help I can get
    thanks in advance

    Hi,
    I am not sure if I interpreted your question correctly, but are you looking for counting for number of days between two days?
    If yes, see if the following example query helps you.
    SQL>select to_date('30-Jun-2003') - to_date('30-May-2003') from dual
    - this returns 31.
    If not, could you please give more details of your requirement with an example?
    -Savitha.

  • How to calculate the difference between 2 different times being input.

    import java.io.*;
    import java.util.*;
    public class ClockingInOut
    public static void main(String[] args) throws IOException
    BufferedReader keyboard = new BufferedReader (new InputStreamReader (System.in));
    String input, input1, input2;
    int num1, num2, answer;
    System.out.println ("\t\t\tEMPLOYEE CLOCKING IN AND OUT SYSTEM!");
    do
    System.out.print ("\nWould you like to clock in and out? yes (y), no(n), ?: ");
    input = keyboard.readLine();
    if (input.equals("y"))
    System.out.print ("Please enter the hours you clocked in: ");
    num1 = Integer.parseInt (input1 = keyboard.readLine());
    System.out.print ("Please enter the minutes you clocked in: ");
    num2 = Integer.parseInt (input2 = keyboard.readLine());
    System.out.print ("Now Please enter the hours you clocked out! ");
    num1 = Integer.parseInt (input1 = keyboard.readLine());
    System.out.print ("And please enter the minutes you clocked out!: ");
    num2 = Integer.parseInt (input2 = keyboard.readLine());
    Hi people, i think my coding may be wrong. I would like the user to input the hours and then minutes of the time they clocked in and out of work. and then i want the program to be able to calculate the hours worked and print the mesage in the Command Prompt window.
    It's really confusing and hard, please help and provide me with the correct soure code if you can.
    Also, like in html how the notepad file has to have the opening and closing brackets, does java coding have something like this.
    Please reply. Thank You.

    hi
    check this java class
    import java.sql.Time;
    import java.text.ParseException;
    import java.text.SimpleDateFormat;
    import java.util.Calendar;
    import java.util.Date;
    public class util
        public static void main(String[] args)  throws Exception
            long t1 = getTimeOnlyLong();
            Thread.sleeo(2000);
            long t2 = getTimeOnlyLong();
            System.out.println(differenceBetween2Times(t1,t2));
        public static long getTimeOnlyLong()
            Date d = new Date();
            return d.getTime();       
        public static String differenceBetween2Times(long l1 , long l2)
            long diff = l1 - l2;
            System.out.println("differ =  " + diff);
            Date d = new Date();
            d.setTime(diff);
            SimpleDateFormat sdf = new SimpleDateFormat("HH:mm:ss");
            return sdf.format(d.getTime());       
    }

  • How to calculate the time between triggering the signal and receiving back

    i want the time elapsed between triggering the signal and receiving it back through a ultrasonic sensor in compactrio labview fpga.

    thank you sir for your reply, but im working on fpga target cRIO-9082 chassis it wont support those palletes , yah if i dont work on fpga target then i can use those palletes ....in attaching the vi for generating a digital pulse and acquiring it back but yrt dint got any idea hot to determine the time...if the vi is wrong please make the neccessary changes. i used this vi to determine the total time between trigger and receving signal of ultrasonic sensor.
    Thank you 
    Attachments:
    pulse generation.vi ‏51 KB

Maybe you are looking for