conversion of date to the chariot returns 9999 as year

Hello

My version of SQL Developer is

Oracle IDE3.2.20.09.87

I have a table T that has a collar of the column Date

I'm on fire:

select col from T;

I get the value returned as: 31 December 99

When I'm on fire:

select to_char(col,'YYYY/DD/MM') from T;

I get the value returned in the: 31/12/9999

However, when I have the fire:

select to_char(to_date('31-DEC-99','DD-MON-YY'),'YYYY/DD/MM') from dual;

I get the value returned in the: 12/31/2099

What could be the cause of two different values returned when selecting DOUBLE and T?

ORA - aff wrote:

Thanks yoyo, what I get is:

Typ = Len 12 = 7: 199,199,12,31,1,1,1

I would expect Typ = 13 for a column.

CREATE TABLE test_dump (d DATE);

INSERT INTO test_dump VALUES (DATE ' 9999-12-31');

INSERT INTO test_dump VALUES (DATE ' 1999-12-31');

INSERT INTO test_dump VALUES (DATE ' 2099-12-31');

SELECT d, DUMP (d) test_dump;

D DUMP (D)

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

31.12.9999 Typ = Len 12 = 7: 199,199,12,31,1,1,1

31.12.1999 Typ = Len 12 = 7: 119,199,12,31,1,1,1

31.12.2099 Typ = Len 12 = 7: 120,199,12,31,1,1,1

If your date is really the year 9999

Tags: Database

Similar Questions

  • Date of issue - conversion to date and the date of conversion in months

    I have some data in a text file for SQLLDR from a SQL SERVER.

    In date columns are YYYY-MM-DD format eg-2011-01-03 00:00:00

    but in oracle, we use DD-MM-RRRR.

    Don't know why the SD and MM are get interchanged. Help, please.

    It's my for sqlldr control file:
    LOAD DATA 
    INFILE 'F:\NV\Permits\SQLLDR\permits.txt'
    REPLACE 
    INTO TABLE lot.p_permit
    FIELDS Terminated by "~" TRAILING NULLCOLS
    (
     CP_PermitID  "TRIM (:CP_PermitID)",
     CP_SubmitDate "to_date(to_date(substr(:CP_SubmitDate, 1,19),'RRRR-MM-DD HH24:MI:SS'),'DD-MM-RRRR')",
     CP_IssueDate "to_date(to_date(substr(:CP_IssueDate, 1,19),'RRRR-MM-DD HH24:MI:SS'),'DD-MM-RRRR')")

    You convert date to date. First TO_DATE

    TO_DATE (substr (: CP_IssueDate, 1.19), "DD-MM-RRRR HH24:MI:SS")

    Converts correctly 19 characters of the CP_IssueDate string to date. Now, look at what is happening with the other. To_date first argument is string. Since to_date (substr (: CP_IssueDate, 1.19), "DD-MM-RRRR HH24:MI:SS") are dates:

    TO_DATE (to_date (substr (: CP_SubmitDate, 1.19), 'DD-MM-RRRR HH24:MI:SS'), "DD-MM-RRRR")

    implicitly converts the to_date (substr (: CP_IssueDate, 1.19), "DD-MM-RRRR HH24:MI:SS") to a string using default date format, then converts it back to the date using the format "DD-MM-RRRR. Of course if the default date format is not "DD-MM-RRRR" you can either get an incorrect date or a mistake. In any case, use:

    LOAD DATA
    INFILE 'F:\NV\Permits\SQLLDR\permits.txt'
    REPLACE
    INTO TABLE lot.p_permit
    FIELDS Terminated by "~" TRAILING NULLCOLS
    (
     CP_PermitID  "TRIM (:CP_PermitID)",
     CP_SubmitDate "to_date(substr(:CP_SubmitDate,1,10),'YYYY-MM-DD')",
     CP_IssueDate "to_date(substr(:CP_IssueDate,1,10),'YYYY-MM-DD')"
    )
    

    SY.

    Published by: Solomon Yakobson August 1, 2011 16:45

  • time / date of the iPhone is hundreds of years to

    my daughter has an iPhone 5 c which displays a date.of Wednesday 13 2559BE.

    The phone is set to this day & time is AUTOMATIC, but what makes no effect.

    is there a way to resolve this issue?

    It's because she was able to switch to the use of the Buddhist calendar... It isn't a date, it is simply not the same as the calendar that you are used to see.

    Settings > general > language & region > calendar.

    Most of the world uses the Gregorian calendar.

  • Dynamic action for validation of date with the notification message plugin

    Hi all

    Someone help me please with dynamic action for validation of date with the message notification plugin. I have a form with two elements of the date picker control and message notification plugin.

    The requirement first user selects the exam is finished and then selects the date. So, if the date is greater than the date of the examination is over + 2 years then doesn't trigger the message notification plugin. I tried to create that dynamic action on the date picker date that triggers the scheduled issue notification message but I want to make conditional, I mean displays the message only if date of the selected is greater than the date of the exam is finished more than 2 years.

    In terms simple, notification is displayed only if provided is superior to (date of the exam is completed + 2 years).

    I use oracle apex 4.0 version and oracle 10g r2 database. I tried to reproduce the same requirement in my personal workspace. Here are the details. Please take a look.

    Workspace: raghu_workspace

    username: orton607

    password: orton607

    APP # 72193

    PG # 1

    Any help is appreciated.

    Thanks in advance.

    Orton.

    You can get the value of the date of entry:

    $(ele) .datePicker ('getDate');

    So what to add functions such as:

    function validateNotification (d1, d2) {}

    Date1 var = $(d1) .datepicker ('getDate');

    date2 var = $(d2) .datepicker ('getDate');

    if(date1 && date2) {}

    return ((date2.getTime()-date1.getTime())/(1000*24*60*60))>(365*2);

    } else {}

    Returns false;

    }

    }

    The logic based on setting (I have two years from years of 365 days preceding)

    Then in the D.A. specify a JavaScript expression as:

    validateNotification ('P2_REVIEW_COMPLETED', this.triggeringElement.id)

    Refer to page 2 for example.

  • Date of the Monday of the week and year

    Hi gurus,

    I have the data for the week (eg.52) and year (eg. 08) and I need to get the date of the Monday of the week (December 21, 2008... IE 52nd week of 2008.)

    Pls know me the solution for this sql statement...


    Thank you
    Shashi...

    Hi, Shashi,

    user588757 wrote:
    Hi gurus,

    I have the data for the week (eg.52) and year (eg. 08) and I need to get the date of the Monday of the week (December 21, 2008... IE 52nd week of 2008.)

    Pls know me the solution for this sql statement...

    Thank you
    Shashi...

    Surely you meant December 22, 2008, No 21.
    Assuming that you are talking about ISO dates, where week 1 starts the Monday closest to January 1:

    TRUNC ( TO_DATE ( :year_txt
                    , 'YYYY'
                    )
          , 'IY'
          ) + (7 * (:week_val - 1))
    

    where: year_txt is a string and: week_val is a number.

    TRUNC (dt, "IY") is attached to the Monday of the week 1.

  • How do you return a blank in table 2, when there is no data in the cell related in table 1?

    I run a recreational League of golf and have been recording the scores of the players (50 + players in total) with the intention of maintaining a form of disability from the League.

    So far, I did most of the calculations manually in number. Recently, I have experimented using the Lookup function but have encountered a problem with the time where the player does not play this week.

    In table 1, where I do all scores record cel when they do not play is left blank. However, in table 2 than corresponding cel returns a 0... strikes completely out of whack handicaps.

    Here is what I used in table 2 for the information of table 1...  SEARCH (name, 2016 Stats::Table 1 $Last: $ name, 2016 Stats::Table 1::G44)

    I also tried to add an IF statement, but I have obviously not understood correctly as he said I tried to refer to a cel in the statement itself.

    Example of the disability Page in the table 2 list a 0 is returned in cel 6... which is then averaged in the cel of last second... namely the problem. The cel with the 6 in it is a formula that counts the number of moves played and see it 6 because it counts as a trick played 0. This shows the wrong average score of 65.666

    Them

    A

    78

    1

    78

    Me

    Me

    80

    75

    81

    0

    81

    77

    6

    65.6666666666667

    -10

    As it appears in table 1. indicating the total number of rounds played in 5 and returning the precise average score of 78.8

    Me

    Me

    80

    75

    81

    81

    77

    5

    78.8

    Hi pondball,

    (Could be my 'golf name' somedays)

    Formula in Handicap::B2 and filled to the bottom and right at Handicap::X4

    = IF (LOOKUP ($A, data: $A, Data::B)=0,"",LOOKUP($A,Data::$A,Data::B))))

    IF compared the results of the first SEARCH and if it is zero, returns an empty string. If the comparison returns FALSE, the second SEARCH is called, find and returns the result of zero. AVERAGE does not take into account all results of text, including the string NULL, a zero-length text value.

    COUNT (used in the column count the number of turns) also ignores the text values.

    4th place of disability shows one of the reasons for not using LOOKUP.

    SEARCH alwas accepts a "close fit" with the search value. 'near match' for RESEARCH is defined as 'the largest value equal or less than the value of the research', and for the values text, "less than or equal" can be described as "identical or come forward in a list of items of text in alphabetical order.»

    For us, the other two values in the name list are 'less' us and the most important is 'Them', the values for 'Them' are returned.

    For this reason, I tend to use VLOOKUP instead of RESEARCH in many cases.

    VLOOKUP present the disadvantage of requiring her research-where location which will be the first column of the lookup table (which is not a problem here, because the location of the research is one ot the column data table).

    But also has the advantage of af being able to require an "exact match" search value.

    Here's the same tables of two, with VLOOKUP replacing LOOKUP. Note that the VLOOKUP function has a different syntax than the LOOKUP function.

    Formula VLOOKUP in Handicap::B2, filled with verse down and right at Handicap::X4:

    = IF (VLOOKUP ($A, Data: $A:$ X, COLUMN (), FALSE) = 0,"", VLOOKUP ($A, Data: $A:$ X, COLUMN (), FALSE) ")

    Written as above, the formula works correctly in rows 2 and 3, but will just return the error in the 4th row triangles, since it will not find a match (exact n) for 'Us' in column A of data.

    After confirming that it produces no unexpected error, wrap the formula in function SIERREUR as shown below and repeat the filling down and the right filling operations above.

    SIERREUR function interrupt all errors, including those affecting the results without your knowledge if they occur. Always delay adding IFERROR until you know what are the errors he fools.

    =IFERROR (IF (VLOOKUP ($A, data: $A:$ X, COLUMN (), FALSE) = 0,' ", VLOOKUP ($A, data: $A:$ X, COLUMN (), F ALSE))," ")

    Y2: = COUNT (C2:X 2)

    Z2: = AVERAGE(C2:X2) (base form)

    Z2: = IF (Y = 0,' ", AVERAGE (C2:X 2)) (real form)

    The encapsulation of the AVERAGE function in the IF statement deletes the calculation if the number of items to the average value is zero, AVERAGE preventing from return to a division by zero error. The number of circles in the column there is NOT used in the calculation of the average (AVERAGE did his own count), but is used as a switch 'OK to calculate' leaving the calculation of the AVERAGE to move forward.

    Kind regards

    Barry

  • Reliability of the data in the conversion to & from a Variant...

    It is possible to convert any data type to a variant, and then turn it back on.  In doing so, are there data types who will lose information during the conversion process?  If so, why?

    Yes, you can convert any type to a variable ranging and back. There is a VI called "Variant data" which will have a type as input. He continued to convert the variant the correct data. The side variant must know what type of data to expect. He can pull of the Variant. However, you can use a cluster of generic data that consists of a username and a Variant. Then you can have different types of data which can handle the side reception. It is a two-step process. One of conversion the variant of general type (data type and Variant cluster). The second would be a case statement uses the type then covert the internal variant to the specified type. This approach is used for generic messaging systems. The upper levels of the code will know what to do with the data. The lower levels are just generic data passing around.

    I'm not aware of any information that get lost during the conversion of the data to and from a variant. Of course, I not had no problem using them.

  • Series read returns the string with excess-need information to extract data from the middle of the string

    I read data from a STI flow meter using the base series writing and reading which used the VISA.  The read string begins with 'OK' or an error code, then a carriage return, then the data follows streaming rate temp pressure flow rate comma comma comma comma Temp... and so on. The string ends with a CR LF.  I need to pull the flow, temperature and pressure data out of the string and write it to a file.  I have difficulties to find a function that will retrieve the data for the string.  Any suggestions?  Thank you.

    Try the subset of string in the palette of the chain.

    Or match the model if you want a more direct control.

    Also a good way is the string analysis, but you must be willing to read oexactly, what happens or an error, pass the entrance.

  • I lost the password I gave to a drive using Bitlocker in Windows 7, how can I return it or I can get the data in the back of the player?

    Hello

    I lost the password I gave to a drive using Bitlocker in Windows 7, how can I return it or I can get the data in the back of the player? Data are very important because by my studies are concerned. Help, please. Thank you!

    Hello

    I lost the password I gave to a drive using Bitlocker in Windows 7, how can I return it or I can get the data in the back of the player? Data are very important because by my studies are concerned. Help, please. Thank you!
    People like you that encryption data with bitlocker do it because they want their data accessible only by those who have the certificate. The sad news for you is that you have made a good choice with BitLocker: unless you have the certificate, your data remains inaccessible. There is no backdoor. If he had then BitLocker would be useless.
  • On the forms send us and receive in return, data in the form of fields will be not print.  We can view the data, but the fields to print Virgin.  How can I fix it?

    On the forms send us and receive in return, data in the form of fields will be not print.  We can view the data, but the fields to print Virgin.  How can I fix it?

    OK, it's different. These text boxes are (at least engineering point of view) not considered form data, they are annotations (or markup). On your print dialogue box, you will see a group of "Comments & Form". Make sure that the first control is set to "Document and annotations:

    After this change, you should see the markup of your impressions.

  • How to configure a web service primavera to return the data in the second database?

    Hello world


    We have P6 with WS first deployment on a single weblogic domain server. The first WS returns the first instance of database data.

    Then deployed to the WS second tip on a weblogic domain server separated with a different port. Set up the second WS with < WS2_INSTALL_HOME > / bin/dbconfig.sh, creating a new branch a configuration that specifies one second instance of the database. However, this configuration is ignored, and the second web services return data from the database.

    We have a single domain, including notably the following servers:

    Name / host / Port / deployments

    P6 / localhost / 0001 / P6 (v8.3), p6ws1 (v8.3)

    p6ws2 / localhost / 0002 / p6ws2 (v8.3)

    We have now two different files BREBootstrap.xml.

    P6 BREBootstrap.xml:

    < database >

    < URL > JDBC:Oracle:thin:@db1:1521:db1 < / URL >

    < user name > pubuser < / name >

    password <>anycriptopass1 < / password >

    oracle.jdbc.OracleDriver < driver > < / driver >

    < PublicGroupId > 1 < / PublicGroupId >

    < / data >

    < CfgVersion > 8.330 < / CfgVersion >

    <>configurations

    < name BRE = 'P6 Config_DB1"instances ="1"logDir ="anydir, P6EPPM, p6, PrimaveraLogs"/ >

    < / configuration >

    p6ws2 BREBootstrap.xml:

    < database >

    < URL > JDBC:Oracle:thin:@DB2:1521:DB2 < / URL >

    < user name > pubuser < / name >

    password <>anycriptopass2 < / password >

    oracle.jdbc.OracleDriver < driver > < / driver >

    < PublicGroupId > 1 < / PublicGroupId >

    < / data >

    < CfgVersion > 8.330 < / CfgVersion >

    <>configurations

    < name BRE = 'P6 Config_DB2"instances ="1"logDir ="anydir, P6EPPM, ws2, PrimaveraLogs"/ >

    < / configuration >

    "P6 Config_DB1" and "P6 Config_DB2" including the property database for the database 1 and 2 respectively.

    How to set up a second web service to return the data to the second database?


    Thanks in advance!


    Kind regards

    Dmitry

    So, answer oracle support:

    Looks like it is in the documentation, Web Services cannot be configured in this way as the other modules. See the following topics:

    BUG 19516437 - Is it POSSIBLE TO hardcode a DEPLOYMENT of SERVICES WEB P6 to an INSTANCE of DATABASE? (ask if this is possible)

    BUG 19579735 - FOR BEING ABLE to hardcode A P6 WEB SERVICES DEPLOYMENT to A DATABASE INSTANCE (corresponding improvement because it can be done).

    The problem has been resolved by the following:

    1 create the WebLogic domain.

    2 P6 and p6ws deployed on managed servers.

    3 configuration P6 uses the second instance of database and P6 has not begun.

    4 result: the p6ws (from additional domain WebLogic) returns data for the second instance of the database.

    Kind regards

    Dmitry

  • How to locate the values returned by the data adapter

    I have a need to internationalise/locate a string which our data adapter returns to the web client to fill out things like the table of inventory for our type of object.

    In other words, I would need to make the location in my Java code on the service side.

    But what I do not know how to do is how do I know what locale, the answer must be returned for.  I don't get the locale information in the query for the data.

    Looks like I found my answer: I can get information from the UserSession returned by the UserSessionService.

    One thing I discovered, is that the user must connect to the web client with the regional settings in place.  If you change the value of & local once the user is connected, the new value takes effect.  You will need to sign out and then sign back in.

  • Query regarding different refreshing data from the grid when returned from a workflow

    Hi Experts,

    JDEV version is: 11.1.1.5

    Our application uses dynamic tabs the user interface shell.

    Whenever the user connects, it is taken in A TAB.

    Since the TAB A, the user navigates to TAB B.

    TAB B has a GRID B(table with a few records).

    Column A on TAB B has a hyperlink which, once clicked on will open a stream of different tasks in a different tab.

    Click on the column of hyperlink for the different lines will open different tf (under certain conditions).

    By clicking on the hyperlink, that the method _launchActivity(String title, String taskflowId, boolean newTab) is used, which the TF open in a new tab.

    The user works on the TF (in a new tab) which opened on click of a hyperlink in the column is and click on SAVE.

    Click to save some operation and removeCurrentTab method is called which will close the current tab, and control passes to the first tab (TAB A).

    The problem:

    Once the user tries to click or to return to the TAB B the WHAT GRID B is never updated that we cannot get the descriptor to refresh the data in the grid.

    Any suggestions would be much appreciated.

    Thank you

    Jean Claude

    huh, I thought it was another library in question.

    In all cases, you can use contextual event (when you close the current tab).

    The second option is to navigate to the method executeQuery by code call activities:

    https://blogs.Oracle.com/jdevotnharvest/entry/how-to_navigate_in_bounded_task_flows

  • How to preserve date/time the conversion to DNG?

    When to convert a file to DNG in Lightroom, it changes the capture time in the metadata for the date and time, rather than copy the data from the source.  Is there a way in which I can say from my dates alone?

    Normally the DNG conversion transferring metadata from the source file in the DNG format.   It may be that the source file does not have a capture time nested, in which case LR can sometimes become squirrels. The most effective way to solve this:

    --Select a source file that has this problem.

    -Post a screenshot of grid view of library showing what LR thinks, it is the date of capture under the tile.

    -Convert to DNG, but do not delete the original.

    -Download the DNG format and the original to Dropbox (or similar) and post the link here.

    Who must provide all the necessary information to understand what is happening and find a solution.

  • birthMonth-String to the Date of Conversion - get data from this month

    Hello

    We would like that the EEG records results for birthmonth this month table. If this month is May (05) then I need to get records of Birthmonth for the month may of table.

    {Code}

    Create table birthmonth (birthmonth Varchar2 (10), Numeroclient number);

    INSERT INTO BIRTHMONTH ('1', 100);

    INSERT INTO BIRTHMONTH ('2', 101);
    INSERT INTO BIRTHMONTH ('3', 102);
    INSERT INTO BIRTHMONTH ('41', 103);
    INSERT INTO BIRTHMONTH ('5', 104);
    INSERT INTO BIRTHMONTH ('10', 105);

    INSERT INTO BIRTHMONTH ('11', 106);

    {code}

    Hello

    user1758353 wrote:
    Hello

    We would like that the EEG records results for birthmonth this month table. If this month is May (05) then I need to get records of Birthmonth for the month may of table.

    Here's one way:

    SELECT  *
    FROM     birthmonth
    WHERE     birthmonth     = TO_CHAR ( SYSDATE
                            , 'fmMM'
                          )
    ;
    

    SYSDATE returns the date of the day.
    To_char (SYSDATE, 'MM') returns the current month (a string 2, with a '0' for most of the month).
    To_char (SYSDATE, "FMMM") returns the current month (a string 1 or 2, without a '0').

    {Code}

    Create table birthmonth (birthmonth Varchar2 (10), Numeroclient number);

    INSERT INTO BIRTHMONTH ('1', 100);

    INSERT INTO BIRTHMONTH ('2', 101);
    INSERT INTO BIRTHMONTH ('3', 102);
    INSERT INTO BIRTHMONTH ('41', 103);
    INSERT INTO BIRTHMONTH ('5', 104);
    INSERT INTO BIRTHMONTH ('10', 105);

    INSERT INTO BIRTHMONTH ('11', 106);

    {code}

    Thanks for posting that, but no instructions INSERT works; they need the keyword VALUES.
    Always test (and, if necessary, correct) CREATE TABLE and INSERT statements before committing.

    Is it really wise to save only the month? Most often, people store all birth_date in a DATE column. It is easy to use EXTRACT or TO_CHAR to get the month of a DATE.
    Because you really want to use a column of VARCHAR type, making 10 characters long guest just wrong. Why not make 2 characters? In addition, add a CHECK constraint to make sure invalid month, such as '41' above, does.

Maybe you are looking for