Finding number of datapoints within time interval

Hello
I have a 2D array, with one column for time/date and one for data measurements. I want to specify a upper and a lower time limit, and then be able to find out how many data points that lies within this time interval. Can anyone help me with this?
Greetings
Kristoffer

Hi,
What I would do is to find the index where the data enters your range and the index where the data leaves your ranger, then just take a subarray out of the original array starting at the first index and going the length to the next index.
The attached vi should be a good template.
Regards,
Rob Afton
Attachments:
Timestamp Math Example.vi ‏8 KB

Similar Messages

  • Error on Purchase Order - Document number 45* not within defined interval

    Hi All,
    PLEASE HELP ME or guide me in the right direction.
    I am faced with a somewhat unique case in our enviroment. Some background first.
    Back in 2000 when we upgraded from Walker to SAP, a number of Purchase orders had to be migrated, one of them is the order i am struggling with. Back then very little validations were built in, resulting in a Local Order being incorrectly created as a International Order but against a local currency.
    Now this ordered is still being reflected as open in our system. When attempting to change the order by activating the 'Delivery Complete indicator", we get an error "use only foreign currency" This is due to the fact that validations against Document Type and Currency was created in 2003 and are in full operation now. It is hard coded thus i can not remove this easily.
    Now when attempting to get around this by changing the Document Type to a Local Purchase order or trying to delete a line, we get the error below.
    "Document number 45* not within defined interval"
    Number ranges do come to mind based on the error description, however, Local Orders have a number range of 45, International Orders have a number range of 47. In this case, the order is created as a International Order BUT the number range is 45*, again, due to a lack of validations/incorrect config back in 2000
    Do any of you know a possible solution to such a problem.
    Regards,
    Jody Ponnusami.

    The validation of document type and currency is not standard, and if this validation cannot be deactivated, then you will have to resort to making changes in debug mode. Put a breakpoint at the relevant check and force it to accept the current combination.
    The second option is to update EKPO table manually using SE16N. Set the delivery completed indicator to X.

  • Document number 5000000013 not within defined interval

    Experts ,
    When I am trying to create PO(ME21N),
    System is showing the error
    Document number 5000000011 not within defined interval
    Message no. 06223
    Diagnosis
    The document number you entered does not lie within the interval defined for purchasing documents.
    Procedure
    Contact your system administrator if changes need to be made to the number range interval.
    Help me to solve the issues
    Regards

    Hi Rahul,
         Change your document type and try once again.for creating PO in ME21N you need to select standard PO (NB).
    Check and revert back
    Thanks
    Ram

  • ColumnChart - display number of items per time interval

    I have a collection of objects. Each object has a "time"
    property of type Date.
    I need to display a ColumnChart which shows one column
    representing the number of objects in a time interval. For example
    if I had 5 objects:
    2 have a "time" of 3:00:00
    1 has a "time" of 3:00:12
    2 have a "time" of 3:00:17
    And my time interval should be 10 seconds...then I would have
    to columns one representing 3:00:00 - 3:00:09 and one representing
    3:00:10 - 3:00:19. The first column would have a y-value of 2 and
    the second column would have a y-value of 3.
    Any suggestions on how to do this? Should I maintain a
    Dictionary that maps a time to a count? and bind my chart to that
    Dictionary?

    "anoweb" <[email protected]> wrote in
    message
    news:g93s6o$oca$[email protected]..
    >I have a collection of objects. Each object has a "time"
    property of type
    >Date.
    >
    > I need to display a ColumnChart which shows one column
    representing the
    > number
    > of objects in a time interval. For example if I had 5
    objects:
    > 2 have a "time" of 3:00:00
    > 1 has a "time" of 3:00:12
    > 2 have a "time" of 3:00:17
    >
    > And my time interval should be 10 seconds...then I would
    have to columns
    > one
    > representing 3:00:00 - 3:00:09 and one representing
    3:00:10 - 3:00:19.
    > The
    > first column would have a y-value of 2 and the second
    column would have a
    > y-value of 3.
    >
    > Any suggestions on how to do this? Should I maintain a
    Dictionary that
    > maps a
    > time to a count? and bind my chart to that Dictionary?
    Use a dataFunction.
    HTH;
    Amy

  • ERROR : Object could not be scheduled within the specified time interval

    I have the next error Object could not be scheduled within the specified time interval.
    When i schedule a report to be refreshed and the moment come when the report have to be refresh appear the error.
    i check the error in the following path in the CMC
    HOME> FOLDERS > USER FOLDERS > ... > "REPORT FOLDER"  Instance Properties
    Why i get this error?
    Anyone can give me a good solution to solve this error?
    Thanks!!!

    Hi Ed,
    The above error message is appearing due to the reason, when a large number of requests are scheduled to start at the same time, this may exceed the Maximum Number of Simultanius Requests that the deployment can support.
    To resolve this error message, increase the end time on the scheduled instance. To increase the end time, use the following steps:
    1. In the Infoview, browse to the desired report and click 'History'.
    2. Find the desired scheduled instance and click 'Reschedule'.
    3. Under the 'When' section, increase the end time for the scheduled instance.
    Upon completing these steps, the error message no longer appears.
    Hope it will help in resolving the error.
    Regards,
    Ritesh Nayyar

  • Document number not within defined interval

    I am trying to assign my own po number with idoc pordcr101
    i am using the next po in our system 4500016058.
    when i look in we02 after sending the idoc i see
    document 4500016058 not within defined interval.
    can i assign my own po?  do i need to define my interval somewhere?
    any help would be greatly appreciated.
    thank you

    Hi Janice,
                  You are trying to create a PO with your specified Number, but in R/3 document numbers can exist only in the interval specified, hence check the number range in your R/3 config. and accordingly pad your number with 0's.
    Or you will have to change the interval ( Basis Job ).
    P.S. Also check if your R/3 allows External Number generation.
    Regards.

  • I want to find different time interval btw two times

    hi every body,
    my question : i ll give start time and end time as input.
    i want output ,time interval btw start time and end time
    for exp:  i ll give 7 to 11 as input.
        tables have data like   7   to  7.29.59  --->  1 prog
                                           8.00.00 to 9.29.59-----> 2 prog
                                           10.00.00 to 10.29.59--->3 prog
    i want to find time gap btw the progs  and want display output as  like  7.30.00 - 7.59.59  --->1 interval
                                                                                    9.30.00-9.59.59   ---> 2 interval
                                                                                    10.29.59-11.00.00---->3 interval

    Hi,
    declare some tmp WA as wa_tmp
    loop the data.
    adding from date.
    wa_tmp = data-from + 1 .
    read the next line
    read table data index sy-tabix + 1
    wa_tmp = to date of next line - 1.
    then append wa_tmp to final it.
    endloop.
    Hope it helps.

  • Error Message : Object could not be scheduled within the specified time interval

    Post Author: mohamed elkashef
    CA Forum: Publishing
    Dear All when i try to run event for daily reports it sometimes take generation status failed with this error  message : Object could not be scheduled within the specified time interval so  i need to know the reason of failure and how can i fix  this error  thanks a lot 

    Post Author: nvnaresh
    CA Forum: Publishing
    Dear jsanzone,
    I'm facing the same error even when the server time out is more than the query execution time of the report.By server time out I assume connection time out of WebI report server which I have set to 180 min.But the actual query takes maximum of 5 min.
    We are using BO XIR2+SP2.
    I scheduled a webI report to get saved in Excel format to an Unmanaged disk location upon a File Event.
    We have 3 such reports to be scheduled on the same event.
    Expected frequency of File Event getting fired in a day is twice.Scheduling frequency I have set it as every one hour with the file event.
    This usually should work fine.
    But frequently 1 or 2 of the above 3 instances are getting failed with the following error "Object could not be scheduled with in specified time interval " after being in Running state for few hours(8). Amazingly this is not happening every time. May be once or twice in a week.This works fine after I restart the BO services and the same thing repeats after 3 or 4 days.
    Do I need to increase any server parameters?
    Why is this happening randomly?  

  • Finding Missing Time Interval in SQL

    All 
     Need help with SQL to find Missing Time Interval. 
    My query returns data as given below  
    Data1
     Column      StartTime    EndTime
    =======   =======   ======= 
    T2               9:00          18:00T3               20:00         23:00 
    Data2
     Column      StartTime    EndTime
    =======   =======   ======= T1               15:00          20:00
    T3               20:00          07:00 
    Take above output, I want to find Time Not on my Data in 24 hours from First StartTime on each Data Set.
    Example: Data1
    First StartTime: 9:00 AM (T2 record)
    Add 24 hours, which will be 9:00AM Next day.
    Expected Result to get missing time interval for Data1
    18:00 - 20:00
    23:00 - 9:00 (next day)
    For Data2 Expected result
    7:00 - 15:00 Next Day
    Database version: 11g
    Anyone come across to calculate missing time interval? Can I use PL/SQL for this like pipeline function?
    Any help/directions/references I highly appreciate.
    Thanks in advance.
    Karth

    One way of finding Missing Intervals:
    alter session set nls_date_format = 'DD-Mon-YYYY HH24:MI:SS';
    with data as
      select to_date('28-Jun-2013 09:00', 'DD-Mon-YYYY HH24:MI') start_time, to_date('28-Jun-2013 18:00', 'DD-Mon-YYYY HH24:MI') end_time from dual union all
      select to_date('28-Jun-2013 20:00', 'DD-Mon-YYYY HH24:MI') start_time, to_date('28-Jun-2013 23:00', 'DD-Mon-YYYY HH24:MI') end_time from dual
    select start_time, end_time,
           case when lead(to_char(start_time, 'HH24'), 1, (select min(to_char(start_time, 'HH24')) from data)) over (order by to_char(start_time, 'HH24')) not between to_char(start_time, 'HH24') and to_char(end_time, 'HH24')
                  then to_char(end_time, 'HH24:MI') || ' - ' || lead(to_char(start_time, 'HH24:MI'), 1, (select min(to_char(start_time, 'HH24:MI')) from data)) over (order by to_char(start_time, 'HH24:MI'))
                else
                  null
           end period
      from data
    START_TIME                END_TIME                  PERIOD      
    28-Jun-2013 09:00:00      28-Jun-2013 18:00:00      18:00 - 20:00
    28-Jun-2013 20:00:00      28-Jun-2013 23:00:00      23:00 - 09:00
    Time information need not be stored in additional Varchar fields, if you have Date Column. You can use Date fields that store Date and time both.
    Another way of approaching this problem is with Connect By Clause or Model Clause. Use the search functionality to find solutions using those methods too. However, in my opinion, this method is the quickest of all.

  • How to find diff time interval btw two times

    hi every body,
    my question : i ll give
    start date and end date,
    start time and end time as input.
    i want output ,time interval btw start time and end time
    for exp: i ll give 7 to 11 as input.
    tables have data like 7 to 7.29.59 ---> 1 prog
    8.00.00 to 9.29.59-----> 2 prog
    10.00.00 to 10.29.59--->3 prog
    i want to find time gap btw the progs and want display output as like 7.30.00 - 7.59.59 --->1 interval
    9.30.00-9.59.59 ---> 2 interval
    10.29.59-11.00.00---->3 interval

    Hi,
    declare some tmp WA as wa_tmp
    loop the data.
    adding from date.
    wa_tmp = data-from + 1 .
    read the next line
    read table data index sy-tabix + 1
    wa_tmp = to date of next line - 1.
    then append wa_tmp to final it.
    endloop.
    Hope it helps.

  • What is a fast way to drive a HP53132A counter to do real time, "time interval" measurements?

    Right now I run my system on a simple PCI GPIB bus. The fastest I can the time interval measurement is at 100 Hz. However, the has 350 ns timing and the PC running the program is much faster than this. So I should be able to achieve a rate of at least 10 kHz (depending on the counter of course). Do you have any suggestions for the way to set up the counter for the fastest measurement?

    I think that you're running into a limitation of the counter itself. My manual for the 53131 says that it can can do a maximum of 200 GPIB measurements per second. I think that the 53132 is similar except for extended resolution. What you might try is the STATS mode where you command the counter to take a number of measurements and then calculate the statistic. It is generally fster to let an instrument do a series of measurements and accumulate the results than to try and transfer one measurement at a time over the GPIB bus. VXI, PCI, PXI instruments can do things a lot faster so that might be an option as well. You should also be aware that your rate of 10 kHz requires timing resolution greater than what is in a PC (a PC has 1 msec resolution at best a
    nd it's not deterministic at all) so if you need something accurate, you'll have to use external hardware timing.

  • Without equipment creation serial number required at the time of delivery?

    Dear SAPIENTS,
    Without equipment creation serial number required at the time of delivery? In customizing i have defined that equipment not required in serialization profile. But still i am getting equipemnt number at the time of delivery of sales order.
    Regards,
    Kaushal Rai

    Dear Venu,
    You want to generate Alphanumeric Serial Number that is possible by following Enhancement for Serial Numbers:
    Pls find here some details about generating alphanumeric serial numbers as below :
    You can generate alphanumeric serial number with the following BADI / Customer Exit:
    Name of Enhancement : IQSM0001
    Name of Function Module Exit: EXIT_SAPLIPW1_001
    Name of Include : ZXQSMU01
    ZXQSMU01:
    This user exit can be used to create the serial numbers automatically for material of a production order. Number of serial numbers generated will be equal to the total number of quantity. The purpose behind development of this user exit was to attach prefix in each serial number generated.
    so as per your requirement you can generate serial number like ABC0001 etc.
    Process Steps:
    For exit: EXIT_SAPLIPW1_001
    1. Get serial number profile for a material in respective plant.
    2. Check if the profile is u2018XYZu2019.
    3. If profile is u2018XYZu2019 generate the serial numbers for the given quantity of material in production order.
    General Program Structure
    For exit: EXIT_SAPLIPW1_001
    1. Get the serial number profile using function module 'MARC_SINGLE_READ' for a material.
    2. Check if the profile is u2018XYZu2019.
    3. If the serial number profile is u2018XYZu2019 then generate the serial numbers for the given production order quantity of a material.
    4. Concatenate ABC as a prefix to the all generated serial numbers
    Provide above details reg. implementation BADI / Enhancement to your ABAPer and go ahead.
    You can implement above Enhancement in CMOD.
    Hope this helps.
    Revert in case of any doubt.
    Award points if useful.
    Regards,
    Tejas

  • Changing images after time interval.

    Hi,
    I want to show images that am calling from xml file into flash, I want to show them each after a certain time interval, I want to do this in AS3 How it can be done?
    Thanks
    IceHero

    make use of Timer function
    var myTimer:Timer;
    //  timer_length=length_img;          //Total number of images in xml.
    and with each timer inteeval counter is increased by one to get the next image.
    Here is one sample.
    var xmlReq:URLRequest=new URLRequest("images.xml");
    var xmlLoader:URLLoader=new URLLoader();
    xmlLoader.load(xmlReq);
    xmlLoader.addEventListener(Event.COMPLETE,loadXML);
    function loadXML(e:Event)
        xml=new XML(e.target.data);
        length_img=xml.*.length();//Total no of images...
        //timer event is called on the COMPLETE event of the xml when the xml is loaded
        //then the timer event is called....
         timer();   
        loadImage();
      function timer()
        //to store the timer event.
         timer_length=length_img;
        myTimer=new Timer(7000,timer_length);
        //5000 means 5 sec delay and timer_length is the no of times this timer work.In this case it should work only up to the total no of images.Suppose       //  images are 12 in xml then timer will work 12 times.
        myTimer.addEventListener(TimerEvent.TIMER,timeLine);
        myTimer.start();
        function timeLine(e:TimerEvent):void
        //event listener of timer event.
        loadImage();
        counter=counter+1;
         function loadImage()
        //Loads the image by this function and various effects added here.
                urlImage=xml.image[counter].imgURL;
                var imgReq:URLRequest=new URLRequest(urlImage);
                //loads the image url and image in this request.
                imgLoader=new Loader();
                imgLoader.load(imgReq);
                //Loads the image in loader.
                mc_container.addChild(imgLoader);
                //loads the image in the mc_container movie.
                }//ends the load image function.

  • Find number of occurances of a particular character

    Hi,
    is there any keyword to determine number of times a particular character is present in the string,
    E.g. VAR1 = 'ghghj#ghjgjgh#ghjghjg#ghjg#'.
    I want to find number of occurances of # in VAR1.
    Regards,
    Raghavendra

    Hi,
           use folowing logic.
           data:begin 0f itab,
                    var1 type c,
                     var2 type c,
                     var3 type c,
                      var4 type c,
                  end of itab.
      split var1 at '#' into itab-var1 itab-var2 itab-var3 itab-var4.
        if not itab-var1 is initial.
            count = count + 1.
        endif.
           if not itab-var2is initial.
            count = count + 1.
        endif.
        if not itab-var3is initial.
            count = count + 1.
        endif.
        if not itab-var4is initial.
            count = count + 1.
        endif.
    write count.
    regards
    amole

  • To find the latest date and time

    HI all,
    I have a Ztable which contains execution date and exe time.
    1) I need to find the latest date and time How  can we do this?
    2) In my program,I need to insert some values to date,time and status field in Ztable. How can I insert it directly into the table?
    for eg ZTAB-DATE = 010122006
            ZTAB-TIME = 12.20.20
          just INSERT ZTAB is enough or NOT????????????
    POINTS WILL BE REWARDED
    THANKS IN ADVANCE

    1) You can do a number of things, one you can get all of the relevant records and sort the internal table by date and time in decending order, then simply read the first record of the internal table.
    2) It depends on the key of the table. Say for example, you have a table like so.
    MANDT
    KEYFIELD
    DATE
    TIME
    If the key alreays exists, you can use the modify statement to update the record, if it dosn't exists, you need to use the INSERT statement to insert the records.
    data: xtab type ztable.
    xtab-keyfield = 'ABC'.
    xtab-date = '20070207'.  " or sy-datum
    xtab-time = '221600'.    " or sy-uzeit.
    insert ztable from xtab.
    Make sure to use internal fomat for DATE and TIME.
    Regards,
    Rich Heilman

Maybe you are looking for