Date Format Issue in Session

DECLARE
err_mesg_out          NUMBER(1):=0;
x     DATE;
y     VARCHAR2(50) := Null;
z     DATE;
BEGIN
select scheduled_date into x
from CONTRACT_SCHEDULED_FULFILLMENT where CONTRACT_ID=94875672 and fulfillment_type_id=9;
dbms_output.put_line('x ='||x);
select TO_CHAR(scheduled_date,'MM/DD/YYYY HH24:MI:SS') into y
from CONTRACT_SCHEDULED_FULFILLMENT where CONTRACT_ID=94875672 and fulfillment_type_id=9;
dbms_output.put_line('y ='||y);
z := TO_DATE(y,'MM/DD/YYYY HH24:MI:SS');
dbms_output.put_line('z ='||z);
--my_proc(10001,20002,z,err_mesg_out);
END;
OutPut
x =14-feb-2011
y =02/14/2011 11:46:24
z =14-feb-2011
err_mesg_out =0I want to get the 'z' variable value in 'MM/DD/YYYY HH24:MI:SS' format in my session. Why I think so is because the same format/value need to be passed to
a procedure "my_proc" - which is currently commented out. Even if I hardcode the 'z' param value while calling the "my_proc" it still throwing exception
my_proc(10001,20002,'02/14/2011 11:46:24',err_mesg_out);
ORA-01843: not a valid monthWhen this procedure is getting executed from the application code with the same value/format it's working fine and I think something need to be done in my SQLPLUS session. Can anyone suggest how I can set the date format to resolve this ?

Hi,
As Blushadow said, format (such as the difference between '16-Feb-11' and '02/16/2011 05:08:13') is something that applies only to strings, not DATEs. All DATEs have the same (purely internal) format, which has nothing to do with how they appear when you display them.
By the way, assuming you want the variables x and y, the following code does exactly the same as what you posted:
DECLARE
     err_mesg_out     NUMBER (1)     := 0;
     x          DATE;
     y          VARCHAR2 (50)      := Null;
     z          DATE;
BEGIN
     select      scheduled_date
     into      x
     from      CONTRACT_SCHEDULED_FULFILLMENT
     where      CONTRACT_ID          = 94875672
     and      fulfillment_type_id     = 9;
     dbms_output.put_line ('x =' || x);
     y := TO_CHAR (x, 'MM/DD/YYYY HH24:MI:SS');
     dbms_output.put_line ('y =' || y);
     z := x;
     dbms_output.put_line ('z =' || z);
--     my_proc (10001, 20002, z, err_mesg_out);
END;
/ There's no need to query the table more than once, and it's just plain silly to convert a DATE (such as scheduled_date) into a string (such as y), just so you can convert it back to a DATE (such as z) again.
If all you want to do is call my_proc, then the following is all you need:
DECLARE
     err_mesg_out     NUMBER (1)     := 0;
     z          DATE;
BEGIN
     select      scheduled_date
     into      z
     from      CONTRACT_SCHEDULED_FULFILLMENT
     where      CONTRACT_ID          = 94875672
     and      fulfillment_type_id     = 9;
     dbms_output.put_line ('z =' || z);
--     my_proc (10001, 20002, z, err_mesg_out);
END;
/

Similar Messages

  • 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)));

  • 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 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 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 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.

  • Set nls-date-format for each session

    I'm using oracle 8i on win2k professional. Using sql*plus I want my date formats as: 'DD-MON-YYYY'
    how is it possible for each session.
    Regards

    You posted this same question in the SQL forum. Did you see my reply?
    Re: How to populate a filter field in one page with the value from other pa
    Armand

  • Date format issues

    Hello,
    I have a problem when executing the following statement from vb.net application.
    update TEST_REC_2 set nk_rec1_rec2 = 506736003, jrnl_timestamp = '2007-06-01-14.54.32', jrnl_gdg = null, jrnl_verb = null, jrnl_jsn = '2203384', jrnl_program_name = 'dstor001', jrnl_dbname = 'jeff', jrnl_user_id = 'ibmuser' where p_k = 506736002.
    The error I got is ORA-01861: literal does not match format string. I know the problem is with the date format in column jrnl_timestamp . But I cannot change the statement, its coming from the Message Queue.
    Is there any option to make this work??

    You have got 2 options :-
    1. Set NLS_DATE_FORMAT in the session and then update with your specific date format
    alter session set nls_date_format='YYYY-MM-DD-HH24.MI.SS';
    update TEST_REC_2
    set nk_rec1_rec2 = 506736003,
    jrnl_timestamp = '2007-06-01-14.54.32',
    jrnl_gdg = null, jrnl_verb = null, jrnl_jsn = '2203384', jrnl_program_name = 'dstor001', jrnl_dbname = 'jeff', jrnl_user_id = 'ibmuser'
    where p_k = 506736002
    2. Modify the SQL to include "to_date"
    update TEST_REC_2
    set nk_rec1_rec2 = 506736003,
    jrnl_timestamp = to_date('2007-06-01-14.54.32','YYYY-MM-DD-HH24.MI.SS'),
    jrnl_gdg = null, jrnl_verb = null, jrnl_jsn = '2203384', jrnl_program_name = 'dstor001', jrnl_dbname = 'jeff', jrnl_user_id = 'ibmuser'
    where p_k = 506736002
    Choose the right approach based on what you can and what you can't.

  • 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. 

  • Date format with alter session -- very urgent !!!!

    The default format of date is DD-MON-YY.
    I like to change as DD/MM/YYYY. So I tried to do so by going
    through my login in SQLPlus and wrote
    ALTER SESSION
    SET NLS_DATE_FORMAT = 'DD/MM/YYYY'.
    The format got changed and there after every query displayed
    date in dd/mm/yyyy format. But once I exit sqlplus and reenter
    in sqlplus, the format goes away and the default date format i.e
    dd-mon-yy comes in existence.
    I want to know, how can i make my date format permanent and too
    for all users.
    null

    hello Khan,
    You can set this format in 2 ways, one is
    local setting and the other one is on server setting.
    Edit your c:\windows\oracle.ini (local setting)
    or your init.ora (oracle server setting)
    and add this script
    SET NLS_DATE_FORMAT = 'DD/MM/YYYY'
    note: if there's no nls_date_format in oracle.ini, the server
    nls_date_format in init.ora will be the current setting
    on your PC
    Hope this will help
    NEC PHIl.
    Shamsad Khan (guest) wrote:
    : The default format of date is DD-MON-YY.
    : I like to change as DD/MM/YYYY. So I tried to do so by going
    : through my login in SQLPlus and wrote
    : ALTER SESSION
    : SET NLS_DATE_FORMAT = 'DD/MM/YYYY'.
    : The format got changed and there after every query displayed
    : date in dd/mm/yyyy format. But once I exit sqlplus and reenter
    : in sqlplus, the format goes away and the default date format
    i.e
    : dd-mon-yy comes in existence.
    : I want to know, how can i make my date format permanent and
    too
    : for all users.
    null

  • Date formating issue

    Hi All,
    I am receiving the Begin Date and End date from one of the RFCs and then using these dates for the import parameters of another RFC.
    But the second RFC receives the dates either in YYYYMMDD or DD.MM.YYYY format.
    The BeginDate and EndDate of the first RFC are binded to two input fileds so they appear as Date pickers in the runtime.
    As I select the date range , I need to execute the second RFC before submition and so the Import of the Second RFC should receive the date range .
    I have gone through many Forum threads but the way they are suggesting, returns me no right result. If I follow the Simple date Format, I parse the date and have a String output which the second RFC does not accept.
    And if I assign the parsed value to the a Date type then I receive a null value for the same. I need your help , please suggest and guide.
    Regards
    DK

    Hi Mohanthy,
    As you told, BeginDate and EndDate of the first RFC are binded to two input fileds and the values of BeginDate and EndDate has to be sent as input fields to another RFC.
    Just get the values from the node generated by first rfc and set them to the i/p node of second rfc.
    Date Format should not be  a issue in this case and for your information the date which is used by RFC is Java.SQL.DATE Class.
    Regards,
    Kiran Kumar

  • 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

  • Date formatting issue when sending excel file via mail

    hello People ,
    I am facing date issue .
    I have inetrnal format of date as yyyymmdd.
    I am converting it into  YYYY-MM-DD.
    CONCATENATE gs_output-end_date(4)
                        gs_output-end_date+4(2)
                        gs_output-end_date+6(2)
                        INTO lv_date_to SEPARATED BY gc_seperator. " gc_separator = '-'.
            gs_output-end_date = lv_date_to.
    I am writing this date and sending an excel file via MAIL . I get date result as MM/DD/YYYY always.
    Now if i pass in YYYY.MM.DD and used the same code where gc_separtor = '.'.
    I get output as YYYY.MM.DD.
    Can any one give me an idea why in format YYYY-MM-DD it is getting overwritten but for yyyy.mm.dd it gives me as yyyy.mm.dd?
    Regards,
    Abhi..
    Edited by: Thomas Zloch on Jul 11, 2011 2:30 PM - subject enhanced

    Thanks , Rohit ,
    I have change my date format in SU01 settings .
    It is now made to [ YYYY-MM-DD] but still '-' is replaced by MM/DD/YYYY.
    Also note that when i format in the following way
       CONCATENATE gs_output-rdadate(4)
                        gs_output-rdadate+4(2)
                        gs_output-rdadate+6(2)
                        INTO lv_rda_date.
    instead of
       CONCATENATE gs_output-rdadate(4)
                        gs_output-rdadate+4(2)
                        gs_output-rdadate+6(2)
                        INTO lv_rda_date sepearted by '-'.
    I get output as YYYYMMDD.
    Regards,
    Abhishek.

  • Data Format Issues

    I have 2 tables
    1) Test_Date with varchar2(30) as Data type
    2) Update_date with date format
    create table test_date
    (dt_maintained varchar2(30),
    dt_updated    varchar2(30))
    INSERT INTO (DT_MAINTAINED,DT_UPDATED)
    VALUES('07/02/200901:07:24','07/02/200901:07:25');
    CREATE TABLE UPDATE_DATE
    (DT_MAINTAINED  DATE,
    DT_UPDATED     DATE);I am getting error when i try to insert data into UPDATE_DATE Table which have Date as data Type
    insert into update_date(DT_MAINTAINED,DT_UPDATED)
      select to_char(to_DATE(dt_maintained,'dd/mm/yyyyhh:mi:ss'),'DD-MON-YYYY HH:MI:SS'),
      to_char(to_DATE(dt_updated,'dd/mm/yyyyhh:mi:ss'),'DD-MON-YYYY HH:MI:SS') 
      from test_dateAny help is appreciated

    Your NLS_DATE_FORMAT is probably set to 'DD-MON-YY'.
    If you want default output for date values like 'dd/mm/yyyyhh:mi:ss' you should use
    alter session set nls_date_format='dd/mm/yyyyhh:mi:ss';If you don't understand, you can try:
    alter session set nls_date_format='dd/mm/yyyyhh:mi:ss';
    select sysdate from dual;
    alter session set nls_date_format='DD.MM.YYYY';
    select sysdate from dual;
    alter session set nls_date_format='DD-MON-YY';
    select sysdate from dual;The nls_date_format doesn't matter for the stored date values. A stored date has no special format, but it needs to be formatted when you want to display on screen.
    NLS_DATE_FORMAT is the default format for output.
    I want to say it again. If you want to store the character values from your test_date table into your update_date table you only need to convert the values to date.
    You can use the following command:
    insert into update_date(DT_MAINTAINED,DT_UPDATED)
      select to_DATE(dt_maintained,'dd/mm/yyyyhh:mi:ss'),
             to_DATE(dt_updated,'dd/mm/yyyyhh:mi:ss') 
      from test_date;Edited by: hm on 19.10.2010 00:07

Maybe you are looking for