Bug in comparison to Date?

Hi all

Please note the 2 sets of code pasted below. They return both the same output of 1 January 87 ' but the ' < ' and ' > ' signs were exchanged in the control IF condition. No idea why this is happening? Is this a bug or am I missing something here?

Thank you

SID

Code 1:
----------

DECLARE

THE DATE;

BEGIN

THE: = TO_DATE ('01-' |) 'JAN' | ' -'|| substr('1987',3,2), 'DD-mon-YYYY');

IF months_between(LA,SYSDATE) > 0 THEN

dbms_output.put_line (la);

END IF;

END;


CODE 2:
-----------
DECLARE

date of temp_start_date_date;

I have SEVERAL;

temp_month varchar2 (4);

BEGIN

i: = 1;

temp_month: = "JAN";

temp_start_date_date: = TO_DATE ('01-' | temp_month |) » -'|| substr('1987',3,2), 'DD-mon-YY');

IF months_between(temp_start_date_date,SYSDATE) > 0 THEN

dbms_output.put_line (temp_start_date_date);

END IF;

END;

Published by: the_reckoner on October 15, 2009 05:56

Hello

I'm not sure of the question here. Ask yourself why the 1st query does not produce a value, but the second not?

If so, it's because of your conversion to_date.

In the 1st query convert you a date using DD-MON-YYYY indicating a date of 1 January 1987 "." Comparing sysdate using months_between which gives-23073, so less than 0.

In the 2nd query convert you to a date using DD-MON-AA giving a date of January 1, 2087 '. Comparing sysdate using months_between which gives 926, so superior to 0.

Concerning

Paul

Tags: Database

Similar Questions

  • The bug that erases the data on macs has been fixed?

    The bug that erases the data on macs has been fixed?

    The update in question has been removed from the distribution. There is a new update which solves the problem. When you are prompted for the update, you should install it as usual members of creative cloud. If you have problems with the update, please contact customer support.

    Alternatively, you can refer to this blog for more details:

    http://blogs.Adobe.com/adobecare/2016/02/12/creative-cloud-desktop-on-Mac-update-issue/

  • Comparison of dates in Coldfusion

    Hello


    I have a problem with the comparison of date in coldfusion code. I followed the following technique to date comparison:

    < cfset > tag allows you to change all date values in a format:

    < cfset date1 = #CreateODBCDate (FORM. StartDate) # >
    < cfset date2 = #CreateODBCDate (FORM. EndDate) # >
    < cfset date = #CreateODBCDate (xx.enterdate) # >

    Then I did the comparion in the < cfif > tag to return all data in the database that match the criteria:

    < cfif (#DateCompare (date, date1) # NEQ - 1) AND (#DateCompare (date, date2) # NEQ 1) >

    Return dates between date1 and date2.

    I don't get an error message but, my production is not correct. Help, please.

    Vijayvijay77.

    vijayvijay77 wrote:

    I changed the query and used # all about dates. Its generating an error saying:

    Incorrect syntax near '09'.

    I don't understand. I appreciate your pateince with me.

    Vijayvijay77.

    I guess that '09' is the value of one of the form fields and '09' is not a DATE as a computer includes the dates.

    But you'd have a better understanding of what is happening if you knew what SQL statement has been sent to the database.  This can be illustrated by turning on debugging ColdFusion or dumping the variable "result" of the statement.  It can also be included in the error message.  It would be included in the structure of If you where to put a ... block around your query.

  • Bug report, loss of data from the user [iOS]

    Nasty bug with user data loss: I put the phone to sleep so that in Acrobat. I then switched back on it, although he was in portrait orientation, not landscape in which she was recently in (if that matters). Acrobat has shown a message "a system error has occurred" and then all my hands-free the past 2-3 days where lost marks. Note: markings more aged 2 or 3 days are preserved, but even more is lost than just my last reading session. iPhone 6s more with iOS 9.1 and version Acrobat from November 13, 2015. Date of update to Acrobat looks suspiciously close to the date after which I lost everything

    Hi Orlin,

    We just released Acrobat Reader for iOS version 15.3.0 on January 5, 2016.

    This version includes the fix for the failure you have encountered.

    Would you please try it and let us know if it works for you?

    Thank you!

  • Bug in comparison

    Hi all

    There is a good one, which may have an obvious answer (and that's the reason why I first decided to ask here before filing a bug).

    < cfset t1 = ToString("00237000000075384887") >

    < cfset t2 = ToString("00237000000075384892") >

    < cfif t1 t2 EQ > < equal cfoutput > #t1 # #t2 # < / cfoutput > < cfelse > < different cfoutput of #t2 # #t1 # > < / cfoutput > < / cfif >

    The result of the above is rather surprising. Just this kind of comparison think the numbers are equal. In addition, even if the two numbers are converted to strings, ColdFusion still think they are equal.

    If you use Compare(t1,t2) However, ColdFusion starts by comparing the chains that we humans and distinguish between them

    Now if there is no known limitation to compare the long numbers etc. or the fact that the middle of each of them is filled with zeros affects everything, welcome to point out for me.

    Simon

    Do a google on "floating point precision.

    As CF is weakly typed, it must make some assumptions when it comes to what type operations is significant. The EQ operator is an example of this: If the CF can climb the operands of numeric values, it will be, which is what he does here. And when it converts strings into numeric values, both are 2.37000000075E + 017, so they equal.

    If you want to compare two strings explicitly as chains, then you must use compare(), as you might have already guessed.

    There are no surprises in everything you see.

    --

    Adam

  • Shading, comparison of dates and report Word

    Hi guys,.

    I need help. I, I compare a few dates in a table, if I find a date prior to the date today, I have to shade or color the background of this cell in green or red and set the table, in a report to Word.

    Attached, that's what I'm trying. For now I'm just dealing coloring for January. If it works, I will apply it to the other months.

    Need help please.

    James.Morris wrote:

    So definitely pay attention to my comments above and the comment by ben on your formatted string. If you ignore these suggestions and difficulty only the only thing you ask comments, you will be here with more questions or spend a lot of time additional debugging your code.

    As to the specific cell background color, you can access the Word.Tables object instead of the object of the Document that you were using. On this basis, you can go to a specific cell and set the color. As follows:

    I added this to your code and it worked. The digital input from the left is connected to the loop index, it is thus goes to the line concerned for all what cell you analyze now. A key to note here is report indices are base 1 instead of 0-based.

    Even simpler than this, use the Word and the palette of Word tables Shadind.vi table borders!

    Ben64

  • need to comparison of date for the duration of the connection.

    Hello gurus,
    I have a table which qualifies whenever a connection/disconnection occurs in a system. However, the data are not the same line, there is a connection as a line entry and a disconnection as a line input.
    The table is simply: log_hist (user name, position, login, logout, upd_date).
    Login, logout and upd_date are types of data with a format as date (1 January 13 0200').
    I need to qualify when a user connects to the system (opening date of session) and then calculates when they disconnected (disconnect date) assuming that the time of minimum latency between a line for the date of connection and a line for date of disconnection.

    LAG can be used to do this?

    Hello

    An the Heres how:

    SELECT       userid
    ,       LAST_VALUE (login IGNORE NULLS)
               OVER ( PARTITION BY  userid
                         ORDER BY          NVL (login, logout)
                 ) AS prev_login
    ,       logout
    FROM       log_hist
    ORDER BY  userid
    ,            NVL (login, logout)
    ;
    

    From the Oracle 11.2, LAG can be used for this instead of LAST_VALUE.

    I hope that answers your question.
    If not, post a small example data (CREATE TABLE and only relevant columns, INSERT statements) and also publish outcomes from these data.
    Explain, using specific examples, how you get these results from these data.
    Always say what version of Oracle you are using (for example, 11.2.0.2.0).
    See the FAQ forum {message identifier: = 9360002}

    Published by: Frank Kulash, January 23, 2013 16:25

  • Comparison of date strings

    Hello

    I have a Varchar2 field in Oracle DB holding a time as 20120419130609883.

    I need to pass a parameter to a query via a DB adapter in SOA suite and get the records from the table with the dates after a certain date, for example get records after 20120415130609883.

    This is my query:
    SELECT ID, NAME, LASTUPDATETIME db.tablename WHERE LASTUPDATEDDATETIME >?

    So I have records in the table with datetime: '20120419130609883' (19 April)
    and I pass the parameter: '20120415130609883' (15 April)

    The query returns nothing. What I am doing wrong?
    I'm sure I'm not doing something very stupid as asking the wrong table.

    Thank you.

    JDeveloper 11.1.1.5

    Hi user,

    How to write the application in pure sql option? In addition, in the conversation above that I saw above, when you make a pure sql option, you usually get a possibility to choose the schema name, which will come only for other database operations.

    There are two things, you can check to confirm.

    1. check the data source of the database adapter and see with what schema is this data source created in the administration console. Now, check if the table you are querying is covered by the same schema (schema with which your data source has been created). If both the pattern is the same, it shouldn't be a warning when you write pure sql code in pure sql option.

    2. Furthermore, if the schema of the source data and the schema that contains the table aren't the same; what you can do is, in the pure option sql make sure you give the scheme name before the table, for example,

    --------

    Select * from schemaname.tablename

    -------

    also while doing the second option, make sure that the schemaname datasource should have privileges to access the tables under the schemaname where your actual table is there. Ask your DBA to assign privileges to the schema if you work with the 2nd option.

    It should work, let me know.

    Hope this helps,
    N

  • Comparison of date ranges

    Hello


    It is called table with columns FROM_DATE and TO_DATE vacation, I have to do a posting as if there are dates entered between these two dates, it should show me the number


    For example: FROM_DATE: March 8, 2011 AND TO_DATE: 9 March 2011 given in the table

    If I try to enter FROM_DATE: 5 March 2011 AND TO_DATE: March 11, 2011


    He has to show me the County again as 1. am try this query, but it is 0. Please suggest me to change


    SELECT COUNT (*) FROM vacation
    WHERE
    (5 March 11 ' between from_date and to_date or)
    11 March 11 ' between from_date and to_date)

    Sudhir_Ness wrote:
    Hello

    It is called table with columns FROM_DATE and TO_DATE vacation, I have to do a posting as if there are dates entered between these two dates, it should show me the number

    For example: FROM_DATE: March 8, 2011 AND TO_DATE: 9 March 2011 given in the table

    If I try to enter FROM_DATE: 5 March 2011 AND TO_DATE: March 11, 2011

    He has to show me the County again as 1. am try this query, but it is 0. Please suggest me to change

    SELECT COUNT (*) FROM vacation
    WHERE
    (5 March 11 ' between from_date and to_date or)
    11 March 11 ' between from_date and to_date)

    Hello

    You can't do the opposite

    select count(*) from holidays
    where
    (from_date between '05-MAR-11' and '11-MAR-11' or
    to_date between '05-MAR-11' and '11-MAR-11' );
    

    Note: haven't tried, but that it can produce the result you want... ;-)

    Johan

  • Comparison of date in PLSQL

    Hello

    I have a table of data can I search for items in stores. Each element in the array has an associated purchase date and an associate store. How do you suggest wrote a PLSQL script first sorts the data in the table to store, element and date of purchase and then only prints only stores and items with the date of purchase within 3 days of each other. Thanks in advance.

    -Cassie

    Store: has
    -Point: 123
    -Purchase Date: January 1, 2011
    -Point: 456
    -Purchase Date: January 2, 2011

    Note that the point: 789 would not be displayed because the purchase date is January 7, 2011

    To extend on the excellent example of Frank, you can take advantage of window in the partition and get information on all sales on the same item in the store even within 3 days:

      , COUNT(*) OVER ( PARTITION BY  store, item
                             ORDER BY    purchase_date
                      RANGE BETWEEN INTERVAL '3' DAY PRECEDING
                                AND INTERVAL '3' DAY FOLLOWING
             )   AS purchwithin3days
    

    Then, you can find just all records with purchwithin3days > 1, like this:

     WITH    got_gaps AS
      (
       SELECT item
       , store
       , purchase_date
       , COUNT(*) OVER ( PARTITION BY  store, item
                              ORDER BY    purchase_date
                       RANGE BETWEEN INTERVAL '3' DAY PRECEDING
                                 AND INTERVAL '3' DAY FOLLOWING
              )   AS purchwithin3days
       FROM    table_x
      -- WHERE ...  -- If you need any filtering, put it here
      )
      SELECT   store
      ,   item
      ,   purchase_date
      FROM   got_gaps
     WHERE  purchwithin3days >1
      ORDER BY  store
      ,        purchase_date
    

    Using the sample table of Frank, change the records like this:

    DELETE FROM table_x;
    
    INSERT INTO table_x VALUES ( 'A', 123, DATE '2011-01-01');
    INSERT INTO table_x VALUES ( 'A', 123, DATE '2011-01-03');
    INSERT INTO table_x VALUES ( 'A', 123, DATE '2011-01-09');
    INSERT INTO table_x VALUES ( 'B', 123, DATE '2011-01-04');
    INSERT INTO table_x VALUES ( 'B', 123, DATE '2011-01-11');
    INSERT INTO table_x VALUES ( 'B', 123, DATE '2011-01-14');
    INSERT INTO table_x VALUES ( 'A', 789, DATE '2011-01-07');
    
    COMMIT;
    
    SQL> SELECT * FROM table_x ORDER BY 1,2,3;
    
    STORE       ITEM PURCHASE_
    ----- ---------- ---------
    A            123 01-JAN-11
    A            123 03-JAN-11
    A            123 09-JAN-11
    A            789 07-JAN-11
    B            123 04-JAN-11
    B            123 11-JAN-11
    B            123 14-JAN-11
    
    7 rows selected.
    

    .. .and the query will return only the purchases of point 123 store A January 1 and January 3 and store B Jan 11 and 14.

    SQL>  WITH    got_gaps AS
      2    (
      3     SELECT item
      4     , store
      5     , purchase_date
      6     , COUNT(*) OVER ( PARTITION BY  store, item
      7                            ORDER BY    purchase_date
      8                     RANGE BETWEEN INTERVAL '3' DAY PRECEDING
      9                               AND INTERVAL '3' DAY FOLLOWING
     10            )   AS purchwithin3days
     11     FROM    table_x
     12    -- WHERE ...  -- If you need any filtering, put it here
     13    )
     14    SELECT   store
     15    ,   item
     16    ,   purchase_date
     17    FROM   got_gaps
     18   WHERE  purchwithin3days >1
     19    ORDER BY  store
     20    ,        purchase_date
     21  ;
    
    STORE       ITEM PURCHASE_
    ----- ---------- ---------
    A            123 01-JAN-11
    A            123 03-JAN-11
    B            123 11-JAN-11
    B            123 14-JAN-11
    
    4 rows selected.
    
  • Is this a BUG?  Export of data besides the foreign key constraints

    I use SQL Developer 1.5.4 with patches installed 59,47 and 59,59. I want to do an export of database from a scheme of 10 g XE and include all objects in the DOF resulting. So I select ALL the checkboxes in the Export Wizard and when I get to step 3 to specify the objects, I don't see any of my constraints in the list box... not foreign key constraints, without constraints of primary key, without check constraints, nothing. Is this a bug, or is there a workaround, or which could possibly hurt? We want to be able to use the database export function to easily transport and track the changes to our entire schema using source control compares.

    Any help or suggestions replacement would be apprieciated.

    Thank you
    Matt

    Bug 8679318 follows this question

  • Oracle text using for dynamic comparison of data splitters

    Hello

    I have two tables with similar columns. There is a free text field (e.g. address). Address fields contain 1 to 10 words in different order.
    Address cut into 4 columns: Address1, Address2, address3, zip.

    ***************************************************************************************************************************

    I want to be able to retrieve all related rows in both tables using the CONTAINS operator and/or search fuzzy. Any other solution is more then welcome.

    ***************************************************************************************************************************

    TABLE oldaddress Data:

    12385 OAK LN APT 9898 LAYTON, UT 84040

    TABLE newaddress Data:

    9898 12385 OAK LN LAYTON, UT 84040 APT
    12385 OAK LN APT 9898 LAYTON, UT 84040
    12385 OAK LINE LAYTON, UT 84040
    9898 12385 OAK LN LAYTON UT APARTMENT
    12385, OAK LINE LAYTON, UT 84040

    Please, note that basically {color: #008000} * addresses * are the same{color}. My goal is to recover all of the new addresses by comparing the data to the oldaddress table.

    My steps are:

    -1.
    create the table OLDADDRESS
    (
    ID NUMBER (20) not null,
    ADDRESS1 VARCHAR2 (30),
    ADDRESS2 VARCHAR2 (30),
    ADDRESS3 VARCHAR2 (30),
    POSTCODE VARCHAR2 (10),
    ALL_COLS VARCHAR2 (1)
    );

    -2.
    create the table NEWADDRESS
    (
    ID NUMBER (20) not null,
    ADDRESS1 VARCHAR2 (30),
    ADDRESS2 VARCHAR2 (30),
    ADDRESS3 VARCHAR2 (30),
    POSTCODE VARCHAR2 (10),
    ALL_COLS VARCHAR2 (1)
    );
    -3. Insert data
    Start
    insert into OLDADDRESS (ID, Address1, Address2, ADDRESS3, ZIPCODE) values (' 11, ' OAK 12385 LN ","APT 9898', 'UT LAYTON', 84040');
    insert into NEWADDRESS (ID, Address1, Address2, ADDRESS3, ZIPCODE) values (22, "APT 9898', ' OAK 12385 LN", 'LAYTON UT", 84040');
    insert into NEWADDRESS (ID, Address1, Address2, ADDRESS3, ZIPCODE) values (' 33, ' OAK 12385 LN ","APT 9898', 'UT LAYTON', 84040');
    insert into NEWADDRESS (ID, Address1, Address2, ADDRESS3, ZIPCODE) values (' 44, ' 12385, OAK LN ","APARTMENT 9898', 'UT LAYTON', 84040');
    insert into NEWADDRESS (ID, Address1, Address2, ADDRESS3, ZIPCODE) values (55, ' 12385 OAK LINE","APT 9898', 'UT LAYTON', 84040');
    insert into NEWADDRESS (ID, Address1, Address2, ADDRESS3, ZIPCODE) values (' 12385 OAK LN, 66; "," APT 9898', "LAYTON UT»(, 84040');
    insert into NEWADDRESS (ID, Address1, Address2, ADDRESS3, ZIPCODE) values (77, 'APARTMENT 9898' 12385.', OAK LN', 'LAYTON UT', '84040');
    commit;
    end;

    -4. Created a section of land:
    BEGIN
    CTX_DDL. CREATE_PREFERENCE ("my_datastore", "MULTI_COLUMN_DATASTORE");
    CTX_DDL. SET_ATTRIBUTE
    ("my_datastore",
    "COLUMNS",
    "ADDRESS1, ADDRESS2, ADDRESS3');
    CTX_DDL. CREATE_SECTION_GROUP ('MYGRP', 'BASIC_SECTION_GROUP');
    CTX_DDL. ADD_FIELD_SECTION ('MYGRP', 'FIELD1', 'ADDRESS1', TRUE);
    CTX_DDL. ADD_FIELD_SECTION ('MYGRP', 'FIELD2', "ADDRESS2", TRUE);
    CTX_DDL. ADD_FIELD_SECTION ('MYGRP', 'FIELD3', 'ADDRESS3', TRUE);
    END;
    /

    -- 5. CREATING INDEXES
    CREATE INDEX my_idx WE newaddress (all_cols)
    INDEXTYPE IS CTXSYS. FRAMEWORK
    PARAMETERS
    ("My_datastore of the DATA store
    GROUP of SECTIONS mygrp');

    -6. Select all the fields:

    SQL & gt; Select Address1 address2, address3, postal code
    2 of newaddress
    3 where CONTAINS (all_cols, (12385 & Oak & 9898'), 1) & gt; 0;

    ADDRESS1 ADDRESS2 ADDRESS3 ZIP
    -----
    9898 12385 OAK LN LAYTON, UT 84040 APT
    12385 OAK LN APT 9898 LAYTON, UT 84040
    12385, OAK LN APARTMENT 9898 LAYTON, UT 84040
    12385 OAK LINE APT 9898 LAYTON, UT 84040
    12385 OAK LN. 9898 APT LAYTON, UT 84040
    9898 12385 APARTMENT. LAYTON, UT 84040 OAK LN

    6 selected lines.

    -7. * Here, I am not able to find a way to make massively for several lines? How to use the operator CONTAINS external data instead of text (12385 & Oak & 9898')?
    Should I use ref cursor / bulk collection? Maybe the REGULAR EXPRESSIONS must be useful (and how)? *

    Select Address1 address2, address3, postal code
    of newaddress
    where CONTAINS (all_cols, (' Param 1 & 2 Param & Param 3... &...)) Param no), 1) > 0;

    Param 1 & Param 2 & Param 3... &... Param n refer to ' select address1. » '|| address2 | "| Address3 oldaddress'.

    I use oracle 10g.

    Thank you for coming ;)


    Kind regards

    Julia

    I don't know what kind of output desired, perhaps something like the following.

    SCOTT@orcl_11g> COLUMN old_ad1 FORMAT A15
    SCOTT@orcl_11g> COLUMN old_ad2 FORMAT A15
    SCOTT@orcl_11g> COLUMN old_ad3 FORMAT A15
    SCOTT@orcl_11g> COLUMN new_ad1 FORMAT A15 newline
    SCOTT@orcl_11g> COLUMN new_ad2 FORMAT A15
    SCOTT@orcl_11g> COLUMN new_ad3 FORMAT A15
    SCOTT@orcl_11g> select o.address1 old_ad1, o.address2 old_ad2, o.address3 old_ad3, o.zipcode old_zip,
      2           n.address1 new_ad1, n.address2 new_ad2, n.address3 new_ad3, n.zipcode new_zip,
      3           SCORE (1)
      4  from   newaddress n, oldaddress o
      5  where  CONTAINS
      6             (n.all_cols,
      7              o.address1 || ' ACCUM ' || o.address2 || ' ACCUM ' || o.address3 || ' ACCUM ' || o.zipcode,
      8              1) > 0
      9  ORDER  BY SCORE (1) DESC
     10  /
    
    OLD_AD1         OLD_AD2         OLD_AD3         OLD_ZIP
    --------------- --------------- --------------- ----------
    NEW_AD1         NEW_AD2         NEW_AD3         NEW_ZIP      SCORE(1)
    --------------- --------------- --------------- ---------- ----------
    12385 OAK LN    APT 9898        LAYTON UT       84040
    12385 OAK LN.   APT 9898        LAYTON UT       84040              51
    
    12385 OAK LN    APT 9898        LAYTON UT       84040
    12385 OAK LN    APT 9898        LAYTON UT       84040              51
    
    12385 OAK LN    APT 9898        LAYTON UT       84040
    APT 9898        12385 OAK LN    LAYTON UT       84040              51
    
    12385 OAK LN    APT 9898        LAYTON UT       84040
    12385 OAK LINE  APT 9898        LAYTON UT       84040              26
    
    12385 OAK LN    APT 9898        LAYTON UT       84040
    APARTMENT 9898  12385 .OAK LN   LAYTON UT       84040              26
    
    12385 OAK LN    APT 9898        LAYTON UT       84040
    12385 ,OAK LN   APARTMENT 9898  LAYTON UT       84040              26
    
    6 rows selected.
    
  • Example of Date comparison work not as expected...

    First of all, sorry for the creation of another post.  Didn't know if I should of just added to a previous message (s) now that I have an example of comparison of date/time works do not as expected.

    I understand that the calendar will use the time zone for the device.  My device is located to the EAST (-0500).

    The following code works fine when the time is set to h, however, does not as expected when in AM...

    java.util.Calendar d1 = java.util.Calendar.getInstance (); now
    java.util.Calendar d2 = java.util.Calendar.getInstance (); now
                      
    String date = ' 11/10/2011-05:05;
                      
    yy int = 0, mm = 0, SD = 0, h = 0, e = 0;
                      
    mm = Integer.parseInt (date.substring (0, 2)) - 1; January = 0
    DD = Integer.parseInt (date.substring (3, 5));
    YY = Integer.parseInt (date.substring (6, 10));
    HR = Integer.parseInt (date.substring (11,13));
    MI = Integer.parseInt (date.substring (14.16));

    D2. Set (Calendar.YEAR, AA);
    D2. Set (Calendar.MONTH, mm);
    D2. Set (Calendar.DATE, dd);
    D2. Set (Calendar.HOUR, human resources);
    D2. Set (Calendar.MINUTE, mi);
    D2. Set (Calendar.MILLISECOND, 0);
                      
    String ampm = date.substring (17, 19);
    If (ampm is 'AM')
    {
    D2. Set (Calendar.AM_PM, Calendar.AM);
    }
    on the other
    {
    D2. Set (Calendar.AM_PM, Calendar.PM);
    }
                      
    long t1 = d1.getTime () .getTime ();
    long t2 = d2.getTime () .getTime ();

    String strCurrentDate = new Date (t1) m:System.NET.SocketAddress.ToString ();
    String strActivateDate = new Date (t2) m:System.NET.SocketAddress.ToString ();
                                  
    If (t1 > = t2)
    Dialog.Inform ("current date of" + strCurrentDate + "is superior to activate date of" + strActivateDate);
    If (t1<>
    Dialog.Inform ("current date of" + strCurrentDate + "is less that activate date of" + strActivateDate);

    The result of current date/time is fine, but the result for strActivateDate is returned as "Tue Oct 11 17:15:48 2011 America/New_York '.  Date is fine, however, is not time.  Time ends as PM (17:05).

    Am I missing something obvious here?  Again, excuse me for the post, maybe should added on the previous post, but I think that this new post can be useful to others in the same situation.  Would appreciate any comments.  Thank you 1 million.

    Karim

    It's what I tell you is wrong and how to fix it.

    http://StackOverflow.com/questions/513832/how-do-i-compare-strings-in-Java

    In short: Do not compare with the help of is, use the equals() method.

  • possible bug in class date

    I stumbled upon a possible bug in the class Date. When comparing two dates of November 20, 2007 and on November 22, 2007, I get false logic.

    public var expireDate: Date = new Date ("2007", "11", "20");
    public var todaysDate:Date = new Date();

    If (todaysDate.getTime () > = expireDate.getTime ())
    {
    this.currentState = "courseExpired";
    }
    on the other
    {
    this.currentState = 'loggedIn ';
    }

    todaysDate.getTime (returned): 1198126800000

    expireDate.getTime (returned): 1195742469234

    But whatever happens, todaysDate wins even if it shouldn't. Courses should have shown have expired.

    probably because the month is zero means the basis therefore 11 December November not :) (I know its not very obvious, but it's like that in flex and java as well).

  • Foreign key constraint, not recognized during the synchronization of data with the model dictionary

    Hello

    Data Modeler is a foreign key constraints do not recognize when synchronizing data with the model dictionary, although the foreign key is there (in the database that a data dictionary is read). I can't find any criterion when a foreign key is not recognized by the Data Modeler. Are there limits to the length of the attribute, or the number of columns in a foreign key, or other limitations which may lead to this behavior not to recognize a fk by Data Modeler? I have columns more than 32 characters. I compared with the fk is recognized by DM, but I can't find anything that indicates why it is not recognized.

    I wonder if someone also has constraints of foreign keys that are not recognized in the comparison of data bases and model?

    Thank you

    Robert

    Hi Robert,.

    Thanks for the comments, I logged a bug.

    Philippe

Maybe you are looking for

  • HP Officejet 6968: HP 6968 memory card?

    Yesterday, I bought the HP Officejet 6968 at Best Buy. When I narrowed my search on the Web from Best Buy site, one of the features I was looking for was a slot for memory card. According to Best Buy descriiption plug, this printer includes a memory

  • Memory upgrade question

    The upgrade of my hp p7 - 1207c for maxium 16 concerts will be running more hot.   My computer runs faster with the upgrade memory but I don't want to take the risk of harming the computer.  Thought that take advantage of the memory at a low price an

  • Lenovo Y410P only loads "Lenovo" logo, will not start!

    Hi, my slightly more mobile years computer does not load. I've recently upgraded from Windows 8.1 for Windows 10 and since I did it I got errors "blue screens of death". There were a couple, but most of the time that it was a mistake to "watchdog" sh

  • Replacing hard drive HP G62

    HP G62 - 355DX Prod # xh068ua Windows 7 64 bit SMART disk error The intelligent control of hard disk detected an imminent failure. On top the startup message. Computer continues to work very well, but everything has been cooked upward as image and th

  • my computer hp zd 8000 laptop has a line of 1.25 verical white up and down the monitor, unable to solve the problem

    my computer hp laptop 2002 zd 8000 has a vertical white line from top to bottom, 1.25 impossible to remove, your suggestion would be useful.