SQLLDR date format issue with AM/PM

Hello Experts,
I am unable to load data into my table in oracle 11G using sql loader.
I will put my problem in a simpler way.
SQL> sho parameter nls_date_format
nls_date_format                      string      DD-MM-YYYY HH12:MI:SS AM
SQL>
SQL> desc hero
Name                                      Null?    Type
DAT_1                                              TIMESTAMP(6)
hero.ctl
LOAD DATA                                                                      
INFILE 'hero.dat'                                                              
INTO TABLE HERO                                                                
FIELDS TERMINATED BY ','                                                       
TRAILING NULLCOLS                                                              
   DAT_1     DATE "DD/MM/YYYY HH12:MI:SS AM"                                                                 
hero.log
   Column Name                  Position   Len  Term Encl Datatype
DAT_1                               FIRST     *   ,       DATE DD/MM/YYYY HH12:MI:SS AM
Record 1: Rejected - Error on table HERO, column DAT_1.
ORA-01858: a non-numeric character was found where a numeric was expected
Table HERO:
  0 Rows successfully loaded.
  1 Row not loaded due to data errors.
  0 Rows not loaded because all WHEN clauses were failed.
  0 Rows not loaded because all fields were null.
hero.bad
"28/2/2011  11:48:00 PM"Constraints :-
1. The data from the flat file cannot be formatted / edited / changed.
2. The table's datatypes cannot be altered.
Regards,
Valli

The problem is that you are trying to put a DATE into a TIMESTAMP column. The DATE needs converting to a timestamp. This would be easier if you used external tables as you could do the conversion on the fly when doing an insert...select... from the external table, rather than relying on the outdated SQL*Loader functionality.

Similar Messages

  • Uk date format issue with ASP and Access Database

    I have an Asp form which updates records in an Access
    database. Problem is
    that the date format in the database record is dd/mm/yyyy
    (UK), when
    the record is displayed on the form it is mm/dd/yyyy(US)
    which after I
    update the record in the database the date has changed to the
    new format.
    I have tried everything I can to change the format but to no
    avail...anyone any ideas how I can resolve this issue?
    Thanks
    Steve

    stevo.s wrote:
    > Hi
    >
    > I have tried changing the format on the date field on
    the server behaviours
    > panelto ddmmyyy. Also have tried to set the form field
    format to ddmmyy. I have
    > also tried to use a function I got from a posting
    somehwere on the net to no
    > avail. <%function ddmmyyyy(varDate)
    > ddmmyyyy = Day(DateValue(varDate)) & "/" &
    Month(DateValue(varDate))
    > & "/" & Year(DateValue(varDate))
    > end function
    >
    > I believe that this is a recognised issue with
    Dreamweaver and Access but
    > can't seem to grasp the work around! Problem being I am
    teaching myself through
    > books and internet articles and can be weeks at a time
    without being able to
    > look at the issue..each time I come back to it it is
    like starting all over
    > again! I was hoping that somewhere out there there is a
    simple solution the
    > issue perhaps a date picker with the built in
    functionality to address the
    > issue...I am keen to understand how to deal with the
    issue rather than just
    > change my database date field to fudge the problem as I
    am in the UK and when I
    > eventually start to use the application I would like
    there to be some
    > consistency with dates and that users are familiar with
    the format.
    >
    > Any help gratefully received!
    Its not Dreamweaver, or Access, its your servers locale, its
    set to US
    format, not the UK.
    On your page at the top use:
    <% Session.LCID = 2057 %>
    This will force the page into using UK formatted dates. Use
    it on any
    page that needs to format the page correctly.
    Dooza
    Posting Guidelines
    http://www.adobe.com/support/forums/guidelines.html
    How To Ask Smart Questions
    http://www.catb.org/esr/faqs/smart-questions.html

  • Date Format Issue with Interactive Form

    Hi, here is the scenario:
    -We just upgraded to SP17 from SP15
    -I'm using Livecycle Designer 8.0
    When we were on SP15, this was not an issue.  I was wondering if anyone encountered this problem and if so, if there is a workaround?
    I create an interactive form to start a guided procedure process.  Im passing the data from my desktop Interactive form to another callable object in GP to send an email with the PDF attached.  This all works correclty. 
    My date/time fields are set to type DATE with a display pattern of YYYY-MM-DD.  When I create the form in the GP administrator to my desktop and open the PDF, the date format is correct. However, when I submit the form to start the process, the incomming date fields to be mapped to my second Callable Object have change in format from "2009-02-18" to  "Wed Feb 18 00:00:00 EST 2009".
    This is true in the new form I receive via email, and also in NWA->monitoring->guided procedures when I check the instances.  The input mapping is already set to the false formatting.
    When I open the form from the second callable object with the incorrect date format (in designer), the date's display patterns are set to YYYY-MM-DD but are not being displayed as such.
    New discovery....I tried to create a Business Logic callable object and format the date.  I created a string input and date output and mapped them accordingly.  When I perform a "TEST" from the design time and use the input "Wed Feb 18 00:00:00 EST 2009", the string is automatically converted to 18/02/2009 in the output, which is what I want to occur.  The only problem is when I run the actual process, the same "Wed Feb 18 00:00:00 EST 2009" is being output instead of the 18/02/2009 in the TEST.
    Anyone have any ideas?
    Thanks.
    Edited by: Warren Clements on Feb 26, 2009 2:20 AM

    This test program might help...
    import java.util.*;
    import java.text.*;
    public class ExpandYear
        public static void main(String[] args) throws ParseException
         SimpleDateFormat sdf_2dyear = new SimpleDateFormat("MM/dd/yy");
         SimpleDateFormat sdf_4dyear = new SimpleDateFormat("MM/dd/yyyy");
         String test1 = "3/21/00";
         System.out.println("test1: " + test1 + " to : " +
                      sdf_4dyear.format(sdf_2dyear.parse(test1)));
         String test2 = "4/9/99";
         System.out.println("test2: " + test2 + " to : " +
                      sdf_4dyear.format(sdf_2dyear.parse(test2)));

  • Date Format Issue with Pre-Insert trigger

    I have created a form wherein creation_date and last_update_date are columns in a table that needs to be populated with sysdate (in format mm/dd/yyyy hh:mi:ss am) at time of saving.
    In pre-insert triiger, if I assign date as follows , it works:
    :creation_date=sysdate;
    However this creates date in format yyyy/mm/dd.
    I would like to set it in format mm/dd/yyyy hh:mi:ss am.
    How can this be done-I tried using to_date and to_char but wont work.
    Any ideas?

    hi
    u may try this too.
    when-new-form-instance trigger:
    set_application_property(PLSQL_date_FORMAT,'DDMMYYYY HH12:MI:SS');
    set_application_property(BUILTIN_date_FORMAT,'DDMMYYYY HH12:MI:SS');
    forms_ddl('ALTER SESSION SET NLS_date_FORMAT=''DDMMYYYY HH12:MI:SS'''); sarah

  • Date Format Issue With Sharepoint DateTime Control

    I Have a Web part where in create child control I am creating my controls.
    Where I have SharePoint date time control and I want to change the format of the control on change in the browser languages settings.
    Currenlt I am doing it by setting localID of the control as  DateTime.LocalID=Thread.CurrentThread.CurrentCulture.LCID.
    But it is not working , It always take UK format.
    Please suggest ....!!!!
    Thanks.

    Check this
    http://www.matdesmarais.com/2011/12/changing-the-date-display-format-in-sharepoint-2010/

  • Windows 8.1 Data reordering issue with Intel Adaptors

    According to Intel, there is a data reordering issue with their adaptors and probably this dumb WIDI software. This is from Intel site. they say some are fixed, "A future Windows 8 fix will address this issue for other Intel wireless adapters." I
    have one Nope, still broke. I get drops all the time. Brand new Toshiba laptop I7 16 gigs of ram and a SSD and a 2 gig Vid card. Would be nice to be able to play games but I get dropped all the time. Now would Microsoft quit hiding
    about this, and fix the darn thing. Also i'm a system admin for 13 years. I have build over 1000 PCs and servers. I know bad software. Please fix this. PLEASE. Its not going to just go away and its not just Toshiba, I have seen other companies with the
    same problem. If there is a Fix PLEASE POST IT. Or even a workaround I have tried everything.
    http://www.intel.com/support/wireless/wlan/sb/CS-034535.htm
     

    Hi,
    Have your first tried the software fix under this link for your network adapter?
    http://www.intel.com/support/wireless/wtech/proset-ws/sb/CS-034041.htm
    Please Note: The third-party product discussed here is manufactured by a company that is independent of Microsoft. We make no warranty, implied or otherwise, regarding this product's performance or reliability.
    Also, you can try to check if there is any driver update under Device manager from manufacture's website.
    Kate Li
    TechNet Community Support
    Yep didn't work. Still get drops all the time, had to run a Cat 5E cable to my laptop from my modem, because I have Atheros Gigabyte Lan adaptor. Works Great. The Wireless still drops all the time. Has Microsoft let out the patch to fix this or is it coming in
    April in the 8.1 patch that's coming. Funny thing is all for Widi, I don't even use widi, I got the software to do that from Samsung works better on my TV. Intel and Microsoft need to get this fixed. because their driving off gamers and that's the
    people that make sure they buy Microsoft so they can play games. With the wireless link dead and a great laptop worthless what's the point. Ive been in IT for 13 years building PCs  and Servers how I knew how to run a 60 FT Cat 5e line thru
    a 2 story house and terminate it. Most people don't. Fix the problem.  

  • Error 10000 Date format issue

    Hi all,
    Has anyone seen the following error please or has a troubleshooting hint: -
    "[NT AUTHORITY\SYSTEM (15/10/2012 18:35:12) - Service request cancelled due to an error.
    Error Code: 10000
    Error Description: Failed to create lease requisition.
    Fault code: soap:Server
    Fault string: Service Form Field: 'WarningDate2' has Date format issue.
    Fault details: REQ_0024Service Form Field: 'WarningDate2' has Date format issue.
    CIAC = 3.01
    Date and Time format on the CCP, CPO, vmware and SQL servers all Italian (dd/mm/yy)
    This only happens when we add a Lease Time on the request.
    Do they all have to be set to the US format for this to work?
    If this is a regional setting thing, do I have to change the format on all of the servers (CIAC components)?
    Cheers
    md

    This test program might help...
    import java.util.*;
    import java.text.*;
    public class ExpandYear
        public static void main(String[] args) throws ParseException
         SimpleDateFormat sdf_2dyear = new SimpleDateFormat("MM/dd/yy");
         SimpleDateFormat sdf_4dyear = new SimpleDateFormat("MM/dd/yyyy");
         String test1 = "3/21/00";
         System.out.println("test1: " + test1 + " to : " +
                      sdf_4dyear.format(sdf_2dyear.parse(test1)));
         String test2 = "4/9/99";
         System.out.println("test2: " + test2 + " to : " +
                      sdf_4dyear.format(sdf_2dyear.parse(test2)));

  • A data-binding issue with a combo box.

    Hi,
    Iu2019m having a data-binding issue with a combo box.  The field it is bound to is an integer.  The valid values in the combo box are 1, 2, and 3.  If I add a record when it is set to 1 or 2, the value gets stored correctly.  If I add a record when it is set to 3, it is stored as 1.  However, I can bring up the record just added on the form, change it to 3, and click u201CUpdateu201D and it is saved correctly as 3.  If I change it so that the valid values are 4, 5, and 6, it saves a 1 regardless of what is selected in the combo box.  It looks like the combo box is correctly bound for updates but not for adds.  The table is a master type UDO.  Any ideas?  Iu2019m somewhat committed to the field being an integer.  I'm using 2007A PL47.
    Thanks,
    Mike
    Edited by: Mike Angelastro on Jul 1, 2009 2:43 PM

    I tried a few things on my own.  The result is that I decided that it was not a good idea to use a combo box bound to an integer (numeric) field.  I donu2019t think the SDK can handle it.  The reason it was an integer field in the first place is that before I changed it to a combo box it was a group of two option buttons.  Option buttons use an integer (numeric) field.  This worked just fine until I added a third option; the SDK didnu2019t handle the third option correctly when adding records.  I thought that using a combo box instead would fix that.  I was wrong; the problem remained.  So I decided to use a character (alphanumeric) field instead.  This works just fine.
    So here is my advice:  Never use option buttons if they need to be bound to the database; a combo box will actually work better when bound to the database.  But use a character (alphanumeric) field.
    Edited by: Mike Angelastro on Jul 5, 2009 9:15 PM

  • Data Pump issue with nls date format

    Hi Friends,
    I have a database with nls date format 'DD/MM/YYYY HH24:MI:SS' from where I wish to take export from. I have a target database with nls date format 'YYYY/MM/DD HH24:MI:SS' . I have a few tables whose create statements have some date fields with DEFAULT '01-Jan-1950' and these CREATE TABLE statements when processed by Data pump is getting failed in my target database. These tables are not getting created due to this error
    Failing sql is:
    CREATE TABLE "MCS_OWNER"."SECTOR_BLOCK_PEAK" ("AIRPORT_DEPART" VARCHAR2(4) NOT NULL ENABLE, "AIRPORT_ARRIVE" VARCHAR2(4) NOT NULL ENABLE, "CARRIER_CODE" VARCHAR2(3) NOT NULL ENABLE, "AC_TYPE_IATA" VARCHAR2(3) NOT NULL ENABLE, "PEAK_START" VARCHAR2(25) NOT NULL ENABLE, "PEAK_END" VARCHAR2(25), "BLOCK_TIME" VARCHAR2(25), "FLIGHT_TIME" VARCHAR2(25), "SEASON" VARC
    ORA-39083: Object type TABLE failed to create with error:
    ORA-01858: a non-numeric character was found where a numeric was expected
    The table create sql which adds a column as ' VALID_FROM DATE DEFAULT '01-jan-1970' ' which I think is the issue. Appreciate if someone can suggest a way to get around with this. I have tried altering the nls of source db to be same as target database. Still the impdp fails.
    Database is 10.2.0.1.0 on Linux X86 64 bit.
    Thanks,
    SSN
    Edited by: SSNair on Oct 27, 2010 8:25 AM

    Appreciate if someone can suggest a way to get around with this.change the DDL that CREATE TABLE to include TO_DATE() function.
    With Oracle characters between single quote marks are STRINGS!
    'This is a string, 2009-12-31, not a date'
    When a DATE datatype is desired, then use TO_DATE() function.

  • Date format issue in oracle database

    Hi,
    Back end : Oracle 11.2.0.2.0
    Front end : Forms 11g
    In our application we are facing issue with TO_DATE('DD/MM/YYY') Date format conversion.
    Example: TO_DATE(P_date,'DD/MM/YYYY') giving the result as 20-Dec-0009
    In the above eg the Parameter P_date is coming as '20-dec-09' from the front end (forms 11g)
    The Nls_date_format parameter at database level is set as 'DD-MON-RR'
    Its working fine after changing the conversion as TO_DATE(P_date,'DD/MM/RRRR') .- If we do like this , we need to change in many places , so instead of doing this, is there other solution wrt database settings/Application settings where we can change and fix this issue
    pls help us to solve the issue.
    Regards.
    sathish k

    892913 wrote:
    Hi,
    Back end : Oracle 11.2.0.2.0
    Front end : Forms 11g
    In our application we are facing issue with TO_DATE('DD/MM/YYY') Date format conversion.
    Example: TO_DATE(P_date,'DD/MM/YYYY') giving the result as 20-Dec-0009
    In the above eg the Parameter P_date is coming as '20-dec-09' from the front end (forms 11g)
    The Nls_date_format parameter at database level is set as 'DD-MON-RR'
    Its working fine after changing the conversion as TO_DATE(P_date,'DD/MM/RRRR') .- If we do like this , we need to change in many places , so instead of doing this, is there other solution wrt database settings/Application settings where we can change and fix this issue
    pls help us to solve the issue.
    Regards.
    sathish kWell the solution is right in front of you. As you say, your database environment is set to DD-MON-RR so your database is set to use 2 digit years (something most people moved away from with the millenium bug more than 10 years ago now). You can either change all your code to use RRRR as you've found, or change your database NLS setting to DD-MON-RRRR and change your front end application to pass you a date with 4 digit years so you get e.g. '20-dec-2009'.
    So many people worked hard to resolve the millenium bug issues all those years ago, but still we have people, all these years later, who want to reintroduce the problem. So sad.

  • Date Format issue while Connecting to Oracle8i and Oracle10g

    Hi All,
    While playing around with JDBC drivers, I came across this weird issue. I have a Local machine with Japanese Locale and I have 2 Database Servers that too with Japanese Locales and Oracle 8i and Oracle 10g each. Now, I connect to these database using JDBC drivers for 8i and perform "select sysdate from dual". Then, m getting dates with 2 different format. While 8i being returning Date with 'DD-MON-RRRR' format, 10g returns date with 'DD-MM_RR' format.
    Initially I thought it might be because of some VM Locale thing but when I connected to 10g DB from 8i Oracle client, this behaviour did not changed. Which mean in this case also the date format returned ny the query was different.
    Guys F1! F1! (Help! Help!) Appreciate your help to understand this process. Links and suggestions welcome... :)

    I guess u did not read the whole content. I mentioned this but the difference in behaviour with respect to JDBC drivers made me post this in Java forum.
    As I mentioned, it has something to do with the jdbc driver or oracle server itself. Agreed, but what that "something little to do" is the maiin question.
    I mentioned that I want to understand this process about how JDBC driver works with Client VM specific Locale settings while interacting with Oracle Database.
    Don't you think it could be interesting to know, what it is which brings this difference in results. Its all about clarifying the small bits & pieces which stays unanswered if one overlooks. Its own perception, I felt like asking question, no offense right!

  • Date Format issue in my report.

    Hello Experts-
    I created a report with a date prompt, which we need to enter two dates, start date and end date.
    I followed the steps as they were in this link
    http://obiee101.blogspot.com/2009/03/obiee-between-dates-prompt.html
    I changed the condition in the prompt to Date'1900-1-1' instead of TIMESTAMP'1900-1-1- 00:00:00
    I.e.,
    CASE WHEN 1=0 THEN CALENDAR.D_DATE ELSE Date' 1900-01-01' END
    and
    CASE WHEN 1=0 THEN CALENDAR.D_DATE ELSE Date '2999-12-31' END
    I stored those two dates in two presentation variables start_date, end_date
    In my report, I imposed a filter on my table that, date coulmn in my table is between Date'@(start_date}' and Date'@{end_date}'
    But when I am running the report with entering two dates, I am getting this error:
    *State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 46046] Datetime value 12/1/2010 does not match the specified format. (HY000)*
    I entered 12/01/2010 as start date and 12/02/2010 as end_date
    Can you please guide me in this issue.

    I think your date format is in different format with the date format u stored in presentation variable so better check the date format of the case function u wrote it in you variable that will solve the problem.

  • SAP Business Objects 4.1 - American Date Format Issue

    This issue is something that keeps arising, if your viewing a crystal report, or building a new Webi report in 4.1 and viewing it, the date format seems to come out as M/D/YYYY HH:MM:SS, this never happened in 4.0.
    I will give an example, today I updated a 4.0 to 4.1 using the update path in a development server, and updated to 4.1 SP03 which is the latest. When I decided to write a Web Intelligence Report or create a Crystal report and publish this, all the date formats came out in American date format, and not the standard English one DD/MM/YYYY HH:MM:SS anymore. However if I go to the Live server which I haven't yet updated and is still on 4.0 SP04 Patch 11 and perform exactly the same its in English format as it always was.
    Can someone please enlighten me to what has changed from 4.0 to 4.1 in terms of configuration regarding the date formats changing.
    My server regional settings are English, and using the default GMT date time, so is my machine. 4.0 works 4.1 doesn't work the same.
    I have tried changing the .prm files in the connectionserver\dataaccess folder as well, this doesn't seem to make a difference and also used LOV's in universe objects and when using these in prompts you get ameican format. I have also changed the preferences in the BI Launch Pad to view English locale and the GMT date time for Greenwich Mean Time. 
    Please can someone advise or suggest where I am going wrong here and how to solve this.
    Many Thanks

    Thanks for your quick response. I have done the check on the universe design tool. I have tried the options - Migration forced and set English (UK). I purged the LOVs and refreshed. No luck as yet. Checked the locale and seems to be fine. When i change the BI launchpad - Web Intelligence preferences to HTML, then the LOV displays correctly - dd/mm/yyyy. The behaviour only occurs when displaying LOV in Applet mode. Maybe will have to look at some Java settings. Thanks
    Added Update- I created a variable =GetPreferredViewingLocale() and tested in WEBI Report with a date object. When I use the BI launchpad Web intelligence Preference to HTML - it display EN_GB. When  I use the BI launchpad Web intelligence Preference to Applet - it display EN_US. It seems to be taking preferred viewing locale as US in applet mode is there a way to fix this please.
    Added Update - It was a bug on Infoview and has been resolved on SP4 . The ADAPT Ref is ADAPT01718291. Just finished testing on UAT, going Live next week with SP4. 

  • Sqlldr date format

    Dear experts,
    I'm trying to load txt file into table via sqlldr. I'm receiving error "Rejected - Error on table TEST_TABLE, column PERIOD_START_TIME. ORA-01843: not a valid month
    The date format in flat txt file is MM:DD:YYYY; in the output table I want to have is DD.MM.YYYY
    It looks that sqlldr wrongly interprets input date format - when the input is 07-08-2012 then the output is 07.08.2012 so it assumes that the input is in format MM-DD-YYYY instead of DD-MM-YYYY. And when the day is higher than 12 (13,14 etc) then an error appears
    Do you know where/how to force SQLLDR to interpret it correcly? Is it somehow related to NLS_Lang. settings?
    Control file looks as follow:
    OPTIONS (SKIP=1)
    LOAD DATA
    INFILE test.txt
    APPEND
    INTO TABLE TEST_TABLE
    FIELDS TERMINATED BY ';'
    TRAILING NULLCOLS
    (NE_ID,
    LAC_ID,
    PERIOD_START_TIME DATE 'DD.MM.YYYY HH24:MI:SS',
    PERIOD_DURATION,
    NSCURRENT,
    NSAVERAGE
    Table definition:
    NE_ID     NUMBER     
    LAC_ID     NUMBER     
    PERIOD_START_TIME     DATE     
    PERIOD_DURATION     NUMBER     
    NSCURRENT     NUMBER
    NSAVERAGE     NUMBER
    INPUT DATA:
    NE_ID;LAC_ID;PERIOD_START_TIME;PERIOD_DURATION;NSCURRENT;NSAVERAGE;
    576527001;37000;07-16-2012 09:00:00;60;24846;24956;
    576527001;37000;07-08-2012 10:00:00;60;1;1
    Thanks in advance for any hints
    Rgds
    Lukasz

    Hi, Lukasz,
    Welcome to the forum!
    user8640349 wrote:
    Dear experts,
    I'm trying to load txt file into table via sqlldr. I'm receiving error "Rejected - Error on table TEST_TABLE, column PERIOD_START_TIME. ORA-01843: not a valid month
    The date format in flat txt file is MM:DD:YYYY; in the output table I want to have is DD.MM.YYYYIn the table, if the column is a DATE, then it won't have either format. Format, such as 'MM:DD:YYYY' versus 'DD.MM.YYYY' only applies to strings.
    It looks that sqlldr wrongly interprets input date format - when the input is 07-08-2012 then the output is 07.08.2012 so it assumes that the input is in format MM-DD-YYYY instead of DD-MM-YYYY. And when the day is higher than 12 (13,14 etc) then an error appears
    Do you know where/how to force SQLLDR to interpret it correcly? Is it somehow related to NLS_Lang. settings?
    Control file looks as follow:
    OPTIONS (SKIP=1)
    LOAD DATA
    INFILE test.txt
    APPEND
    INTO TABLE TEST_TABLE
    FIELDS TERMINATED BY ';'
    TRAILING NULLCOLS
    (NE_ID,
    LAC_ID,
    PERIOD_START_TIME DATE 'DD.MM.YYYY HH24:MI:SS',The format you give after the keyword DATE tessls what the input data looks like. If the month comes before the day in your input file, then you should be saying
    {code}
    PERIOD_START_TIME DATE 'MM.DD.YYYY HH24:MI:SS',
    {code}
    PERIOD_DURATION,
    NSCURRENT,
    NSAVERAGE
    Table definition:
    NE_ID     NUMBER     
    LAC_ID     NUMBER     
    PERIOD_START_TIME     DATE     
    PERIOD_DURATION     NUMBER     
    NSCURRENT     NUMBER
    NSAVERAGE     NUMBER
    INPUT DATA:
    NE_ID;LAC_ID;PERIOD_START_TIME;PERIOD_DURATION;NSCURRENT;NSAVERAGE;
    576527001;37000;07-16-2012 09:00:00;60;24846;24956;
    576527001;37000;07-08-2012 10:00:00;60;1;1SQL*Loader only controls how data gets into a table. It has nothing to do with what you do with that data after it is in the table.
    If you want a DATE column displayed in a particular format, then use TO_CHAR in the query that produces the display, or change NLS_DATE_FORMAT to set the default date format in your session. For example:
    {code}
    ALTER SESSION SET NLS_DATE_FORMAT = 'DD.MM.YYYY HH24:MI:SS';
    SELECT ename
    ,     hiredate
    FROM     scott.emp
    ORDER BY hiredate
    {code}
    Output:
    {code}
    ENAME HIREDATE
    SMITH 17.12.1980 00:00:00
    ALLEN 20.02.1981 00:00:00
    WARD 22.02.1981 00:00:00
    JONES 02.04.1981 00:00:00
    BLAKE 01.05.1981 00:00:00
    CLARK 09.06.1981 00:00:00
    TURNER 08.09.1981 00:00:00
    MARTIN 28.09.1981 00:00:00
    KING 17.11.1981 00:00:00
    JAMES 03.12.1981 00:00:00
    FORD 03.12.1981 00:00:00
    MILLER 23.01.1982 00:00:00
    SCOTT 19.04.1987 00:00:00
    ADAMS 23.05.1987 00:00:00
    {code}
    It doesn't matter what format the date information was in before it was entered into the table. In the table, all DATEs have the same format.

  • Date Formatting Issue

    Hi ,
    I Have Procedure where it take input parameter date value
    for eg
    PROCEDURE P_GET_EMP_DATE(V_DATE IN DATE)
    IS
    V_BEGIN_DATE DATE;
    BEGIN
    SELECT max(BEGIN_DATE) into V_BEGIN_DATE FROM
    emp where TRUNC(APPT_DATE) =V_DATE+90;
    END;
    now my doubt is APPT_DATE is storing the date format in 12/16/2002
    but V_DATE which iam passing to the procedure is in the format
    '14-jul-2008' . When i execute the procedure its compiling and executing
    successfully.
    but when i try to test the single sql manually i get the following error
    ORA-00932: inconsistent datatypes: expected DATE got NUMBER .
    i know to fix the issue we have to do like this
    TO_DATE(TRUNC (APPT_DATE),'YYYY/MM/DD') < = TO_DATE('2007/03/31','YYYY/MM/DD') + 90;
    my doubt is how pl/sql engine interpreting the dates and returning the results
    though there are errors in the query.does it automatically doing formatting
    and type conversions ?

    You seem to be a bit confused about how to work with Oracle dates...
    Basically, we humans represent dates as strings in particular formats: 14th July 2008, 14/07/2008, 07-14-2008, etc.
    Oracle stores dates in its own particular format.
    In order for us to communicate with Oracle's dates, we either manipulate something that's already stored in the database as a date (eg. sysdate or a date column) OR we use the to_date and to_char functions, which convert a string to an oracle date format and vice versa.
    When working with dates in Oracle, you should stick to using the date format. If you're working with things already stored in dates, then great - you've got nothing to worry about conversion wise (and more specifically, never to_date something that's already in the date format!). You only have to worry if you have to specify a particular date as a string - then the to_date function comes into play.
    If you're wanting to output a date, you can either rely on your nls_date_format parameter setting (ok for ad-hoc queries, bad for coded queries!!) or you can explicitly state the format you want it to appear in using to_char.
    Hopefully that's clarified things for you

Maybe you are looking for