Problem with comparing two dates

I'm a bit confused by the present. This is the query

SELECT THE CHECK BOX
WHEN TRUNC (mm.revised_validation_due_date) >
TRUNC (mm.next_validation_date)
THEN
"superior".
ON THE OTHER
'no '.
END
compare,
mm.revised_validation_due_date - mm.next_validation_date datediff,
mm.revised_validation_due_date,
mm.next_validation_date,
To_char (mm.revised_validation_due_date, ' DD/MM/YYYY HH')
revised_with_time,
To_char (mm.next_validation_date, ' DD/MM/YYYY HH') next_with_time
OF tbl_master mm
WHERE mm.tbl_id = 802

the output

compare = greater
DateDiff = 730487
revised_validation_due_date = 2009-02-28
next_validation_date = 2009-02-28
revised_with_time = 2009-02-28 12:02
next_with_time = 2009-02-28 12:02

So... Why did the stated case out with a larger?

This could be the problem:

TO_CHAR (mm.next_validation_date, 'MM/DD/YYYY HH:MM:SS') next_with_time

not looking at the set time, specifically the minutes
the format mask must be

TO_CHAR (mm.next_validation_date, 'MM/DD/YYYY HH:MI:SS') next_with_time

not MM for a few minutes, but MI minutes

Tags: Database

Similar Questions

  • How to compare two dates and find exactly

    How to compare two dates and find the exact age of the person, no one could be an age of child 2 days or a month, or other.

    I'd really appreciate if someone help o

    Concerning

    After spending 2 hours, I go out with a solution by myself, how ever the function can be customize to check if the user enters date right.

    function findAge(subjectName,fromdate, todate) {
        console.log("findAge(fromdate, todate) is called now "+subjectName+"-->"+fromdate+"-->"+todate);
        if(todate) todate= new Date(todate);
        else todate= new Date();
    
        var age= [], fromdate= new Date(fromdate),
        y= [todate.getFullYear(), fromdate.getFullYear()],
        ydiff= y[0]-y[1],
        m= [todate.getMonth(), fromdate.getMonth()],
        mdiff= m[0]-m[1],
        d= [todate.getDate(), fromdate.getDate()],
        ddiff= d[0]-d[1];
    
        if(mdiff < 0 || (mdiff=== 0 && ddiff<0))--ydiff;
        if(mdiff<0) mdiff+= 11;
        if(ddiff<0){
            fromdate.setMonth(m[1]+1, 0);
            ddiff= fromdate.getDate()-d[1]+d[0];
            --mdiff;
        }
        if(ydiff> 0) age.push(ydiff+ ' year'+(ydiff> 1? 's ':' '));
        if(mdiff> 0) age.push(mdiff+ ' month'+(mdiff> 1? 's':''));
        if(ddiff> 0) age.push(ddiff+ ' day'+(ddiff> 1? 's':''));
        if(age.length>1) age.splice(age.length-1,0,' and ');
        console.log("===============================");
        console.log("Subject age is = "+age.join(''));
        console.log(" age Day = "+ddiff);
        console.log(" age Month = "+mdiff);
        console.log(" age Year = "+ydiff);
        console.log("===============================");
        var subjectAGE =  age.join('');
    
    }
    

    peardox Thanks for the reply

  • How to compare two dates and times in BPEL?

    Hi all
    I need to compare two dates and times in a switch activity, but could not find any function for her.

    My switch like this activity:

    case Date1 > date2:
    do something;
    otherwise:
    do something;

    He is not such a function in 'The functions of Date' and can not find this function to xpath.

    IBE, there is no function for a period of time to make (less one date of another?...) If this return to the data compare question).

    Thank you.

    Hello

    Logic function as more/less function can be used to compare two dates so that same comapring two numbers.

    Ex: If your variable reception contains two pieces of data such as date1 and date2, then you can use format in condition switch below.

    XpathXpression (date1) > XpathXpression (date2)

    hope this will help you.

  • Problem with the CLOB data type.

    Greetings,

    I am facing a problem with the CLOB data type. I know that the CLOB data type is 4 GB (I use Oracle 9i). But in the Pl Sql procedure, I can only store 34305 size for a CLOB variable character data.

    This is the test script that I am trying to run.

    DECLARE
    -Local variables here*.
    I have INTEGER;
    C_1 CLOB.
    BEGIN
    FOR Rec IN (SELECT
    *
    ACCORDING TO THE TABLE)
    LOOP
    C_1: = c_1 | Rec.Clo_1;
    END LOOP;
    EXCEPTION
    WHILE OTHERS THEN
    Dbms_Output.put_line (SQLERRM);
    END;


    Here variable C_1 range value 34305 good character regardless of type CLOB. Now the above script fails if query my buckle - huge number of return values. It is throwing the exception "error during transfer of files ORA-06502: PL/SQL: digital error or value."

    He would be grateful if someone can help me on this.

    Thank you.

    You are probably better off using DBMS_LOB.append, instead of the concatenation of varchar2 (|).

    And... take off your when-other Manager exceptions, please...

  • Compare two dates

    Hi, I tried the below question when comparing the two dates, but gives the wrong result

    start date is 01/12/2005 amd stop iss date 07/03/2007

    with t as)

    Select to_date('12/1/2005','mm/dd/yyyy') start_date, to_Date('3/7/2007','mm/dd/yyyy') double stop_date)

    Select * from t

    where to_char(trunc(t.start_date),'mm/dd/yyyy') > to_char(trunc(t.stop_date),'mm/dd/yyyy') or

    TO_CHAR(t.start_date,'mm/dd/yyyy hh: mm: SS AM') > to_char(t.stop_date,'mm/dd/yyyy hh: mm: ss AM')

    Please correct me where I am doing wrong

    Thank you

    You compare characters not dates. Remove to_char where clause.

    with t as)

    Select to_date('12/1/2005','mm/dd/yyyy') start_date, to_Date('3/7/2007','mm/dd/yyyy') double stop_date)

    Select * from t

    When trunc (t.start_date) > trunc (t.stop_date) or

    t.start_date > t.stop_date

  • Problems with registration of data in a FPGA project.

    I have problems trying to save data that I receive on my CompactRIO. I can get the data off of it, trace and display, but I can't seem to save to a file with a recording of VI. Try to solve this problem, I did a VI outside our project that runs the simple task of saving a table provided in a .csv file. Outside the project, this works fine, but when I add this VI project is when I get problems. If I provide a path outside the project, he invites me to the path, in the project, this guest never appears, but I get an error indicating that the user has canceled the operation. I found that this error is the same as you would get if you closed the guest to use the X rather than hitting the Cancel button. If I provide a path in VI, I get no error, but nothing happens and nothing is recorded. Another interesting thing happens when I move this file to the project. When I go to run it, I get a prompt asking you to save Message String.vi Format because it has unsaved changes, and when I ask him to list the unsaved changes, he said that the VI has been recompiled. When I take the VI on the project and run it, it says he has recompiled again and must still be saved. It's really frustrating when such a simple task will not work for any help that you could give is appreciated.

    Will be

    He will never be able to save the file on your PC, only on the controller it self.

    Then use FTP to transfer the files to your PC.

    Or you could do a host PC VI that gets the data from the controller, and then stores the data on the PC.

    To transfer the data, you can use TCP or shared variables.

  • problem with the backup data in text file

    Hello

    The problem I am facing wihile, saving the data in the text file is that everytime when I'm slecting the path of the façade, data that are recorded are added with the previous data, not only in the new text, the new data set is saved but also, is there any previuos run for the program , the corresponding data is also present in this text file.

    However, when I change the same ''(file path) to 'constant' in the control block diagram, and then add the path of the file, it doesn't have this problem. Basically, changing the "file path" constant in the diagram of control block (so that it is displayed in the front panel) is at the origin of the problem.

    Help, please!

    Thank you

    Your shift on the loop Register For is not initialized. It will keep the value of the string since the last time that he performed. That initialize and it should solve your problem.

  • Problem with registration of data in the txt file

    Hello

    I have 2009 Labview, Labview real-time 2009 and cRIO 3.3.0. I also NEITHER cRIO-9024 more cRIO-9112 chassis and modules.

    I would like to save the data measured modules in the txt files, but I want to do in a period of time to time desire. For example, I want to save data of measurements of 60 seconds and repeat every one hour. I of the project (in the file attachment vi) and normally it works fine but I noticed that the recording of the data is not correct. I mean it seams to save what was in the memory before. That's the problem with Windows XP I have check with another computer with Vista and it seems to be ok. It seems that on XP the buffer (refnum?)  is not clear and it retains the previous values.

    Can someone explain to me why it happened and how I can obey Windows XP? Or maybe there are techniques to clear the memory buffer/refnum for rescue?

    Thanks for any help.

    Kind regards

    Kamil


  • BlackBerry Q5 big problem with BB Q5 data - IP ADDRESS REJECTED. :( :(

    Hi all!! I have a blackberry Q5, the version of the 10.2.1.2102 software... It is the best blackberry smartphone I've ever had! but since one week, I have a very big problem with my BB Q5: if I want to surf the internet, with data from my phone (not in WIFI mode but with the data of the phone (4G, 3 g +)), I can not go on any website, but the only thing I watch is a white screen with this message "ERROR HTTP 403.6 ": the IP address of the client has been rejected"...! What can I do? I'm really desperate! I called my provider (SFR), they told me that my connection is ok, I'm not a problem with them, and this is my phone... HELP ME PLEASE!  

    Hello!!! Just to say that finally, after several attempts, I have solved my problem: there was a problem with my service provider SFR with my phone! I regret bringing this up on the forum, but when you call the customer service you think they know their work... but fortunately for us if we have the blackberry is because we are not so ignorant on the connections, network and telephone line! : D have a nice day blackberry users!   

  • Problem with sharing of data specific to the application via BBM 10.2

    Hello - I am having a problem of data sharing applications with BBM 10.2-specific. I take the advice of some comments here, and it seems to work on 10.1. I can receive the file on 10.2, but when I try to share on the same device that I get this:

    InvocationWrapper::onQueryFinished: no matching result from Menu Service for query
       mimeType=""
       uri=QUrl("file:///accounts/1000/shared/misc/My App Data.myapp")
       data= ""
       metadata= QMap()
       perimeter= 0
       action= "bb.action.SHARE"
       target= "sys.bbm.sharehandler"
       invokerIncluded= false
    InvocationPrivate::onQueryResolved: no result matching query, no armed signal sent.
    

    It is the call that I use, which works on 10.1 but not 10.2:

    Invocation {
       id: invokeBBM
       query {
          InvokeQuery {
             id: invokeBBMQuery
             uri: "file:///accounts/1000/shared/misc/My App Data.myapp"
             invokeTargetId: "sys.bbm.sharehandler"
             invokeActionId: "bb.action.SHARE"
          }
       }
    }
    

    I also tried it with a "text/plain" MIME type and a few other variations, same result. If something has changed in point 10.2?

    (And while I'm asking, any reason why I can't use the data instead of a file uri? I need to convert the data in JSON, save the file, share the file, send, receive, save the file on the receiver, then open it, read it, and convert it back. Seems a little roundabout, if I could share the JSON data. "(And this is the only reason that my application requires permissions of shared files)."

    Thank you!

    It is a problem with the current version of BlackBerry Dev 10.2 Alpha.  You can call C++ BBM, but citing QML does not work.

  • EL: Compare two dates

    JDeveloper 12.1.3

    I want to make sure component based on the comparison of two date, something like:

    < af:outputText value = "(Expired)" id = "ot3" inlineStyle = "color: Red; '" make-weight: bold; »

    rendering = "#{now > links.}" EndDate.inputValue} "/ >"

    "now" is java.util.Date from registered managed bean (thin layer of ADF/JSF) while the EndDate above origin of VO (EO-based) and is default java.sql.Timestamp so cannot quite compare the two.

    What is the recommended way to do this?

    I was able to create a bean:

    public class NowTimestamp {}

    Timestamp private now;

    public void setNow (Timestamp now) {}

    This.now = now;

    }

    public Timestamp getNow() {}

    java.util.Date date = new java.util.Date ();

    return of new Timestamp (date.getTime ());

    }

    }

    then use rendered = "#{datebean.now > links.}" EndDate.inputValue}"but read while it is not recommended to have sql. Timestamp in the user interface.

    First rule of the ADF: stop your instincts and start to put your logic in the transient VO attributes, rather than on the safeguarding of the beans.

    To do this, you must create a transitional type VO Boolean attribute, allows to call this attribute "expired".

    In ViewRowImpl.getExpired, you will have:

    public Boolean getExpired() {}

    Since a long time now = System.currentTimeinMillis ();

    Timestamp nowTS = new Timestamp (now);

    {if (getEndDate () .after (nowTS))}

    Returns false;

    }

    Returns true;

    }

    rendering = "#{bindings." Expired.inputValue} "/ >"

  • Problem with order submit data record for Reporting ATG

    Hi, r. j. Nunes

    I am facing problems with the connection to present newspapers for ATG of the report. The logs for RegistrationFileLogger, SiteVisitFileLogger, UserFileLogger, SegmentFileLogger were successfully getting generated but unable to see the logs for OrderFileLogger during shipment of the order.

    I understand that the/atg/reporting/datacollection/trade/SubmitOrderEventListener of the listener must be notified so that the listeners of corresponding data is called in the order:

    SubmitOrderEventListener-> OrderLogEntryQueueSink-> OrderLogEntryGenerator-> OrderFileLogger

    and newspapers would be written.

    But I'm not able to determine which component notifies the SubmitOrderEventListener by submitting an order.


    Is - this SendFulfillmentMessage component? But SendFulfillmentMessage sends the message to the localdms topic: / local/realization/LocalSubmitOrder on the port of OrderSubmitPort which as component SubmitOrderEventListener listen the subject localdms: / local/realization/LocalSubmitOrder on the DEFAULT port?


    Could someone please clarify.

    Thank you

    Saud

    Hello

    Pipelinelink = "sendFulfillmentMessage" name has been commented to our commercepipeline.xml that we did not use OOTB Presse. Once I removed the comment, sent messages and newspapers to submit order got generated.

    Thank you

    Saud

  • need to compare two dates in IDM

    I have a requireemnt where I need to compare two fields that are dates. If the first date is greater than the other, then perform a logic 1 other execute logic 2.
    If anyone is implemeneted scenario so please let me know.

    Thank you
    Kalpana.

    Try below I have implemented similar

    Date value = date get of your method
    SimpleDateFormat formatter = new SimpleDateFormat ("yyyy-MM-DD hh: mm :"); ")
              
    try {}
    Date startDate = formatter.parse ("1971-01-08 00:00:01");
    If (value.before (startDate))
    Return BCFConstants.SUCCESS;
    on the other
    No matter what

    In my example, a date has been set. Thus, I have stated here. You can get both the date in the method and put a similar logic

    -nayan

  • Compare two date columns

    Hello

    I want to compare two columns of dates in a table.

    Here, I wish to confirm that the two values are the same in each record.


    Hope that make sense



    See you soon

    Sexy

    Hi, Vanessa,.

    If d1 and d2 are the two DATE columns:

    SELECT     *     -- or list whatever columns you want to see
    FROM     table_x
    WHERE     d1 != d2
    ;
    

    Displays all the lines where they are declared, but not the same thing.

    If you want to include the lines where one of them is null, but the other is not:

    SELECT     *     -- or list whatever columsn\ you want to see
    FROM     table_x
    WHERE     LNNVL (d1 = d2)
    ;
    
  • Problems with the two Flash/Shockwave

    I have problems with both Flash and Shockwave players. I went to the help pages for both of these players and I followed all of the suggestions that they had players not playing not even if they are installed. I have ActiveX enabled in Internet properties, security software is not in any way afilliated with this problem, which leaves me with being puzzled and frustrated. I hope you guys can help out me if possible, anyway. Also, when I try to reinstall Flash and Shockwave, flash "installed successfully" two videos do not appear.

    I say well, the possibility of an accidental uninstallment of two plugins not too long could have led to this problem.

    Thank you.

    Here is the awnser to your prob... anoying * http://home.att.net/~sjesme/ of hell

Maybe you are looking for