How to select all the records that have the difference of two dates of greater than a value

Hi all

I have a table as below:

ID creation_date Modify_date

--                -------------                                                            -----------

1 10:11:07.243000000 JANUARY 7, 14 H 10:16:16.865000000 7 JANUARY 14 H

2 13 JANUARY 14 12:07:27.603000000'M 12:08:09.955000000 13 JANUARY 14: 00

I want to select all the IDs that is difference of Modify_date and creation_date is greater than 5 minutes.

Please suggest how to achieve this goal, oracle database.

TIA,

Bob

Select *.

from table_name

where (Modify_date - creation_date) * 1440 > = 5


for timestamp:

Select *.

from table_name

where extract (minute (Modify_date - creation_date)) > = 5



-----

Ramin Hashimzade

Tags: Database

Similar Questions

  • How to find the difference between two dates in the presentation layer

    Hi gurus,

    Hello to everyone. Today, I came with the new requirement.


    I need to know the difference between a date and the current date in the formula column application presentation layer.by.



    Thank you and best regards,
    Prates

    Hi Navin,

    TIMESTAMPDIFF function first determines the timestamp component that corresponds to the specified interval setting. For example, SQL_TSI_DAY corresponds to the day component and SQL_TSI_MONTH corresponds to the component "month".

    If you want to display the difference between two dates in days using SQL_TSI_DAY, unlike butterflies SQL_TSI_MONTH and so on...

    hope you understand...

    Award points and to close the debate, if your question is answered.

    See you soon,.
    Aravind

  • Find the difference between two date and time

    Hi friends,

    I wanted to find the difference between two date and time, but my qury is slightest error "invalid number."

    select sql_step_num,proc_name,run_seqno,start_date,end_date,(to_char(start_date,'HH24-MI-SS') - to_char(end_date,'HH24-MI-SS') ) as ed  
    from eval.EVAL_RUNTIME_DETAILS
    where trunc(start_date) = trunc(sysdate) 
    order by sql_step_num;

    You try to get the feel between two char strings.
    And more difference between two dates gives a NUMBER of days.
    Try this:

    select sql_step_num,proc_name,run_seqno,start_date,end_date,numtodsinterval(end_date-start_date,'DAY') as ed
    from eval.EVAL_RUNTIME_DETAILS
    where trunc(start_date) = trunc(sysdate)
    order by sql_step_num;
    
  • How to select all the values populated both of LOV

    Hi all.

    I developed a form containing fields in a table. I join these areas a LOV (which get values in the other table). Now, I have to select a value only once for each record.
    But my question is how to map all the LOV values to these fields at a time. If it is possible what exactly is the way.
    If this is not possible then what is the way to do that.

    Thanks in advance

    Hello!
    Try using this code.
    You will get a lot of messages, but you can discover what column could not be red:

    declare
    l_group recordgroup := find_group ( 'lov27' );
    l_result pls_integer;
    begin
    if
      show_lov --> show the lov and user selected a value
    then
      l_result := populate_group ( l_group );
      clear_record;
      for i in 1..get_group_row_count ( l_group ) loop
        message ( 'reading  personal no' );
        :bill_detail.personal_no := get_group_char_cell ( 'lov27.personal_no', i );
        message ( 'reading  name' );
        :bill_detail.name := get_group_char_cell ( 'lov27.name', i );
        message ( 'reading  desigantion' );
        :bill_detail.designation := get_group_char_cell ( 'lov27.designation', i );
        message ( 'reading  rank' );
        :bill_detail.rank := get_group_char_cell ( 'lov27.rank', i );
        message ( 'reading  basic scale' );
        :bill_detail.basic_scale := get_group_number_cell ( 'lov27.basic_scale', i );
        message ( 'reading  basic pay' );
        :bill_detail.basic_pay := get_group_number_cell ( 'lov27.basic_pay', i );
        message ( 'reading  basic pay' );
        :bill_detail.vendor_no := get_group_number_cell ( 'lov27.vendor_no', i );
        message ( 'reading  branch code' );
        :bill_detail.branch_code := get_group_number_cell ( 'lov27.branch_code', i );
        message ( 'reading  sr no' );
        :bill_detail.sr_no := get_group_number_cell ( 'lov27.sr_no', i );
        create_record;
      end loop;
    first_record;
    end if;
    end;
    
  • How to select all the text with QNX TextInput

    With QNX TextInput, is there a way to select all the text? Spark TextInput a selectAll() method to select all text, but I do not see a similar method in QNX TextInput. No idea how you can choose all the texts with QNX TextInput. Thank you.

    Hey French,.

    Thanks for the clarification! I think I can help you. Here is a code example to show my explanation. In the code below when a user clicks the LabelButton object it will assign the focus to your TextInput object and then select all the text in this object. The only downside is that it will not bring the keyboard. so far, we are not successfully by invoking the keyboard without the user clicking on the TextInput. in any case in the code below, we use TextInput property the textField object as a reference to the TextField object internal. from there, we use the setSelection() method to select the text inside the object from the start to the end position pos. Here's the same code:

    package
    {
        import flash.display.Sprite;
        import flash.display.StageAlign;
        import flash.display.StageScaleMode;
        import flash.events.FocusEvent;
        import flash.events.MouseEvent;
    
        import qnx.ui.buttons.LabelButton;
        import qnx.ui.text.TextInput;
    
        [SWF(width="1024",height="600",backgroundColor="#CCCCCC",frameRate="30")]
        public class TextInputTest extends Sprite
        {
    
            private var myInput:TextInput;
    
            public function TextInputTest()
            {
                super();
    
                // support autoOrients
                stage.align = StageAlign.TOP_LEFT;
                stage.scaleMode = StageScaleMode.NO_SCALE;
    
                myInput = new TextInput();
                myInput.setSize(300,50);
    
                addChild(myInput);          
    
                var newBtn:LabelButton = new LabelButton();
                newBtn.label = "Click Me";
                newBtn.setPosition(325, 0);
    
                newBtn.addEventListener(MouseEvent.CLICK, selectMyText);
    
                addChild(newBtn);
    
            }
            private function selectMyText(e:MouseEvent):void
            {
                stage.focus = myInput;
                myInput.textField.setSelection(0, myInput.textField.length);
            }
        }
    }
    

    hope it's what you want. Good luck!

  • How to select all the text in the document?

    I need to select all the text in a long export to RTF document. I only seem to be able to select a story. Any ideas of how I can do?

    Thank you

    Ian

    Cannot be done. You will need to attach all the text boxes in a long history, or to use the 'ExportAllStories.jsx' script that comes with your installation default InDesign.

    There are other alternatives (each using scripts), and the best way may depend on what are your intentions with the exported file - for example, if you want to read back into their original text after the mounting frames, well, there are ways to do it.

  • How to select all the rows in a Table

    Hello

    JDEV 11.1.1.2.0 work.

    I need to select all the lines all in the click of a button, how can I achieve this? Here is table unique selection/multi selection.

    someone can help me.

    Published by: user5802014 on June 30, 2010 08:32

    Rather than try to direct you to the message that I want to say, I'll just copy the code here with credit to Frank Nimphius

    The post is a hyperlink on the word present in the step 5 post of my "how to search in the forum" :)

    RichTable _table = employeesBackingBean.getEmployeeTable1();
       RowKeySet rks = new RowKeySetImpl();
      CollectionModel model = (CollectionModel)_table.getValue();
      int rowCount = model.getRowCount();
          for (int i = 0; i < rowCount; i++) {
               model.setRowIndex(i);
               //note that in the simple POJO case, the row key is the same
               //as the index. However, it would be wrong to just rely on this
               //because other models or custom table models my return a more
               //comples key. Therefore we iterate over the available rows to
               //obtain the keys.
               Object key = model.getRowKey();
               //add the row keys to the RowKeySet to mark selected
               rks.add(key);
           }
       _table.setSelectedRowKeys(rks);
       AdfFacesContext.getCurrentInstance().addPartialTarget(_table);
    
  • How to select all the text fields at a given time in Adobe Reader ms?

    I created a document that contains more than one text field I created with Acrobat Pro DC, I want to allow the user the ability to select all fields in order to change the text size/color and fonts at the same time... not having to go through the entire form and must make each field separately. To be a little more specific, the document is two pages with six place/lounge cards per page, designed for weddings and other events. Each place card has a field for 'user name' and ' number of table: my question is...» Is it possible to 'select all fields' in Adobe Reader? If I go to Edition > select all, the program selects all graphics and none of the text fields. Not exactly what I'm missing here and I can not find my answer online. Any information would be greatly appreciated.

    Thank you!

    Jodi

    In this case, you can only change the properties of the text selected within a field. Acrobat Reader cannot change the properties of the text field.

  • How to select all the text in the active text block?

    Hello!

    I need a simple script for:

    1. Select all the text in the active frame (ctrl + A)

    2. Paste from the Clipboard (ctrl + V)

    3. go in the beginning new text (ctrl + Home)

    and

    4. Insert the 2 paragraph marks (press enter 2 x).

    That's all.

    I tried, but I'm not not an expert, only good script in DTP and pre-press.

    Thank you.

    Here you go again-

    if (app.selection.length > 0 && app.selection[0].hasOwnProperty ('parentTextFrames')) {
        frame = app.selection[0].parentTextFrames[0];
        frame.parentStory.contents = '';
        frame.insertionPoints[0].select();
        app.paste();
        frame.parentStory.insertionPoints[-1].contents = '\r\r';
    }
    

    Peter

  • How to select all the text, all layers including locked or not visible, using VBScript?

    I'm looking for the more elegant syntax through a document and select all the text frames.

    You cannot select objects in... locked or hidden layers, so you will need to unlock/show layer and do what you need to do with the text, while the layer is visible/unlocked.

    to get all the loop text through the text in the object of the document, you will get all the text elements. If you loop through text in a layer object, you won't get the text located within groups.

  • How to quickly find the difference of two version of RPD?

    Hi all

    Someone has a good idea to quickly find the difference of two versions of the RPD in the project?


    Kind regards
    Anne

    This could be a help for you
    http://varanasisaichand.blogspot.com/2010/03/how-to-merge-two-repositories.html
    http://www.rittmanmead.com/2010/07/OBIEE-11gr1-incremental-patches-to-the-RPD/

    See you soon,.
    KK

    Published by: Kranthi.K on December 7, 2011 21:41

  • Dynamic action - Get the difference between two dates + times

    I have problems a little dynamic to work action. I'm trying to get the time between two dates with the time difference.

    Here is what I got (this is apex 4.0):

    Two date pickers + two numbers fields (date/start/end times)

    I created a dynamic action on the page who fires on the point lose focus (above points).

    The real action for the DA is the body of the PL/SQL function:
    declare
      end_date DATE;
      start_date DATE;
    Begin
      start_date := to_char(:P1_START_DATE || ' ' || :P1_START_TIME, 'DD-MON-YYYY HH:MIAM');
      end_date := to_char(:P1_END_DATE || ' ' || :P1_END_TIME, 'DD-MON-YYYY HH:MIAM');
      :P1_HOURS := end_date-start_date;
    End;
    When I change the values on the page, I get the following error:

    AJAX call back Server error ORA-06502: PL/SQL: digital or value error: character number conversion error to set the value.

    I'm guessing that there is a problem with the date formatting, but I can't make it work. Thanks in advance!

    Hi djston,

    because you chose the dynamic action of 'Set value' with the "Body of the PL/SQL function" type you need to return the value. Try the following code

    declare
      end_date DATE;
      start_date DATE;
    Begin
      start_date := to_date(:P1_START_DATE || ' ' || :P1_START_TIME, 'DD-MM-YYYY HH:MIAM');
      end_date := to_date(:P1_END_DATE || ' ' || :P1_END_TIME, 'DD-MM-YYYY HH:MIAM');
      RETURN (end_date-start_date)*24;
    End;
    

    and P1_REQUESTED_HOURS like 'item affected. "

    Concerning
    Patrick
    -----------
    My Blog: http://www.inside-oracle-apex.com
    APEX 4.0 Plug-Ins: http://apex.oracle.com/plugins
    Twitter: http://www.twitter.com/patrickwolf

    Published by: Patrick Wolf on January 17, 2011 10:54

  • How to select all the other files in a folder?

    I have the folder with 1200 jpg - each 1 a 24 fps movie image. I want to select other images to import in my animation program manager (so my film output will be 12 fps)

    How easily - without having to buy an app - select all OTHER files in the folder?

    (for example some thing help Automator/rename? idk...)

    TIA!

    The Finder, choose utilities go to menu, open the Script Editor and run a script such as:

    Tell application "Finder".

    timeout to 600 seconds

    Set the_files to {}

    Repeat with this_file 1 (count files of the window 1) by 2

    Set the the_files the_files & (this_file window 1 as an alias of the file)

    end repeat

    Select the_files

    end time-out

    tell the end

    (144637)

  • How to select all the contents of the control channel automatically

    Hi all

    We use barcodes to string for control of the input string. How can I replace the old data with the new?

    1.I used keyfocus but new data insert just behind the 'old'.

    2. we do not want to erase the old rope before registration of new data. because it should also check the input string.

    Thank you!

    There is a call from Text.Selection property node where you can choose the starting point of the selection and the endpoint.

  • How to select all the images used in a project?

    Is there a way to watch and selectt all the images and drag them to a separate folder. You can view and multi select topics from the topic... Viewer

    N °

    PLEASE request a feature that more people who do, more likely to occur. Please follow this link.

    http://www.Adobe.com/cfusion/mmForm/index.cfm?name=wishform&product=38

    See www.grainge.org for creating tips and RoboHelp

    @petergrainge

Maybe you are looking for