Streams Conflict Handler Date Format

Hi.
Into my Conflict Handler PL/SQL I have this instruction:
     tmp := lcr.get_value('NEW','DT_ULT_VERIFICACAO'); rc := tmp.getDATE(v_DT_ULT_VERIFICACAO);
     IF (v_DT_ULT_VERIFICACAO is not null) THEN
     cmdupd := cmdupd||',DT_ULT_VERIFICACAO='||'TO_DATE('''||v_DT_ULT_VERIFICACAO||''','''||'DD/MM/RR'||''')'; END IF;
The result after execution is:
UPDATE HW_ITENS SET USER_UNF_ID=13,CD_ITEM=4,NR_INMETRO=32037347,NR_SERIE='ME - 0295',
DT_ULT_VERIFICACAO=TO_DATE('04-DEC-09','DD/MM/RR'),NR_ULT_VERIFICACAO=21036627,TP_ULT_RESULTADO=4
WHERE ITM_ID = 2836955 and SRV_UNF_ID = 13
As we can see, I received a date format of DD/MON/AA. This is not good to my work. I need a date format of DD/MM/AA.
How can I change this when using a Apply Conflict Handler ?
Thank in advance.
JoseFormiga

Did you checked the setting of the database NLS_DATA_FORMAT if the column was date or NLS_TIMESTAMP_FORMAT for timestamp.
Check the setting of V$NLS_PARAMETERS.
set pages 66 lines 190
SQL> select * from V$NLS_PARAMETERS
PARAMETER                                                        VALUE
NLS_LANGUAGE                                                     AMERICAN
NLS_TERRITORY                                                    AMERICA
NLS_CURRENCY                                                     $
NLS_ISO_CURRENCY                                                 AMERICA
NLS_NUMERIC_CHARACTERS                                           .,
NLS_CALENDAR                                                     GREGORIAN
NLS_DATE_FORMAT                                                  DD-MON-RR
NLS_DATE_LANGUAGE                                                AMERICAN
NLS_CHARACTERSET                                                 AL32UTF8
NLS_SORT                                                         BINARY
NLS_TIME_FORMAT                                                  HH.MI.SSXFF AM
NLS_TIMESTAMP_FORMAT                                             DD-MON-RR HH.MI.SSXFF AM
NLS_TIME_TZ_FORMAT                                               HH.MI.SSXFF AM TZR
NLS_TIMESTAMP_TZ_FORMAT                                          DD-MON-RR HH.MI.SSXFF AM TZR
NLS_DUAL_CURRENCY                                                $
NLS_NCHAR_CHARACTERSET                                           AL16UTF16
NLS_COMP                                                         BINARY
NLS_LENGTH_SEMANTICS                                             CHAR
NLS_NCHAR_CONV_EXCP                                              FALSE

Similar Messages

  • Handle Date format in a dynamic way

    Hi Experts,
    I need to handle the date format in a dynamic way in different systems.
    Sample Scenario:
    In my DEV system i am writing a select query where i need to validate the date field which is of the format 12/31/9999.
    select * from <table> where date = '12/31/9999'.
    This gets relevant records & works fine in DEV system.
    But when it goes to QA system the same select query fails to fetch data as the date format is 12.31.9999.
    select * from <table>
    where date = '12/31/9999'. --> Fails
    Similarly when it is PRD system (production) the same select query fails as the date format is 12-31-9999.
    select * from <table>
    where date = '12/31/9999'. --> Fails
    Please post your suggestions.
    Thanks
    Dany

    If you are looking at the date from SE16, or some other output screen, dates are converted to what is referred to as external format. But when they are stored, they are stored in internal format which is always YYYYMMDD. So when you are doing a SELECT from database table using a date field in your WHERE clause, you have to use internal format of the date (YYYYMMDD). When you output a date that you extracted onto a screen using WRITE statement, it will be converted to external format depending on user format specifications. But the date will be in internal format within your program, so if you are transferring a date from the database directly to a file, you are transferring it as YYYYMMDD. If you need it in external format, then you have to use WRITE...TO... option. See help on WRITE command.

  • Handling Date Format

    Hi Everyone,
    I am using DB 11g and Apex 4.1 Versions.
    We are working on a project where most of the time we would be uploading CSV through Apex and store the data in DB using some procedures developed by us and most of the time we get different date formats in the CSV which is sent by the client. It is the major issue which i encounter in my carrer.
    Please suggest me how we can handle or tell the procedure to check if one format doesn't work take another if that also doesn't work go for another.
    Any link or code or anything Please help me with this and make my career a bit more easy :)
    Thanks,
    Shoaib

    Hi, Shoaib,
    Shoaib581 wrote:
    Thanks Guys,Pay particular attention to Paul's reply. The people who enter the data are the best people to make sure it is correct. Do whatever you can to ensure valid, consistent data entry. It may be hard for users who want to use their own favorite format, but not as hard as it is to correct mistakes later.
    >
    >
    Your clarification really helped me and made many things clear for me :). Any suggestion, how we can handle if the date format comes in below formats,
    DD-MM-YY OR DD-MON-YY formats. Oracle forgives you if you use 'MON' where 'MM' was expected, so
    TO_DATE ( '1-Dec-2012'
            , 'DD-MM-YYYY'
            )returns Decemer 1, 2012: it WILL NOT raise an error.
    The converse is not true: TO_DATE (str, 'DD-Mon-YYYY') WILL raise an error if you the month part is '12'.
    Here's a package function I wrote to try various formats in turn:
    --          **   t o _ d t   **
    --     to_dt attempts to convert in_txt to a DATE using in_fmt_1_txt.
    --     If that fails, it tries again, using in_fmt_2_txt.
    --     If that fails, it tries again, using in_fmt_3_txt, and so on.
    --     As soon as one conversion works, the function returns the DATE,
    --     and the remaining formats are not tried.
    --     If all the formats given fail, then in_default_dt is returned.
    FUNCTION     to_dt
    (     in_txt          IN     VARCHAR2                    -- string to be converted
    ,     in_fmt_1_txt     IN     VARCHAR2     DEFAULT     'DD-Mon-YYYY'     -- 1st format to try
    ,     in_fmt_2_txt     IN     VARCHAR2     DEFAULT NULL          -- 2nd format to try
    ,     in_fmt_3_txt     IN     VARCHAR2     DEFAULT NULL          -- 3rd format to try
    ,     in_fmt_4_txt     IN     VARCHAR2     DEFAULT NULL          -- 4th format to try
    ,     in_fmt_5_txt     IN     VARCHAR2     DEFAULT NULL          -- 5th format to try
    ,     in_default_dt     IN     DATE          DEFAULT     NULL          -- Returned if nothing works
    RETURN     DATE
    DETERMINISTIC
    IS
         fmt_cnt          PLS_INTEGER     := 5;          -- Number of in_fmt_ arguments
         fmt_num          PLS_INTEGER     := 1;          -- Number of argument being tried
         return_dt     DATE           := NULL;     -- To be returned
    BEGIN
         FOR  fmt_num  IN  1 ..  fmt_cnt
         LOOP
              BEGIN     -- Block to trap conversion errors
                   return_dt := TO_DATE ( in_txt
                                       , CASE     fmt_num
                                              WHEN  1     THEN  in_fmt_1_txt
                                              WHEN  2     THEN  in_fmt_2_txt
                                              WHEN  3     THEN  in_fmt_3_txt
                                              WHEN  4     THEN  in_fmt_4_txt
                                              WHEN  5     THEN  in_fmt_5_txt
                                    END
                   -- If control reaches this point, then TO_DATE worked
                   RETURN     return_dt;
              EXCEPTION
                   WHEN OTHERS
                   THEN
                        IF  SQLCODE  BETWEEN -1865
                                      AND     -1839
                        THEN
                                NULL;
                        ELSE
                             RAISE;
                       END IF;
              END;     -- Block to trap conversion errors
         END LOOP;
         RETURN     in_default_dt;
    END     to_dt
    ;Once again, this will convert a string like '12/11/10' to a DATE. It will not necessarily return the same DATE that was meant by whoever entered the string.

  • Red X - Due to conflict between date format in Windows Regional settings

    Hello
    I face the following issue. To display some graphes that result of the selection of a date in a Java calendar (format mm/dd/yy) I have to change the Windows regional settings.
    Which of course impact other applications like Excel....
    Is there some settings/applet that can be set in Java JRE to prevent this issue ?
    Same issue what ever the JRE version used.
    currently JRE 1.4.2_07 VM 1.4.2_07-b05, plug-in 1.4.2_07

    Hi Kevin,
    I doubt anyone outside of Sun would be able to give you a definite answer to this one, but from my understanding of the JDK's interactions with Windows, I'd have to say no.
    I usually find that about the only Windows default that the JDK picks on is the current user locale. From there, the JDK likely chooses its own default date and currency formatting instances, as these are all packaged up within i18n.jar within the JDK libraries.
    If anyone can prove me wrong though, please do!
    Hope that helps!
    Martin Hughes

  • Problem in Date Format when user chages the date format in preferences

    I want to generalize my code so that user can change what ever Date format he wants, I will get the date from the page in the format yyyy-mm-dd, and if the Date Format is
    set to MM/dd/yyyy in prefernces i need to use MM/dd/yyyy and if the Date Format is set to dd-Mon-yyyy in prefernces i need to use dd-MMM-yy, so my question is how to know what Date format is set in the preference so that i can have all the possible date format for inserting the date
    Thanks
    Babu

    Babu,
    The date format in OAF Pages is controlled by profile ICX: Date format mask.This profile can be set at site as well as user level for the individual users to set the Date format.
    But I would advice not to go for setting different profile values at user level, because i remember some old threads, where seeded Oracle pages fail, as code their is not generalised to handle date formats.
    If your are planning to have this in ur custom page, go ahead, but do check the entire flow is working fine for different values of this profile at user level.
    --Mukul                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Date Format IN BDC

    Hi,
    In One Interview I was asked that How can You Handle Data Format when Writing BDC ?

    Satya,
    The date format depends on User settings. Its different for different login ID's.
    It can be YYYY.MM.DD or MM.DD.YYYY or anything.
    To handle the date format, you need to query on table USR01 and fetch DATFM field that stores date format.
    Refer below piece of code
    */...Fetch the date format settings for the user
          SELECT SINGLE datfm
                   INTO gv_date_format
                   FROM usr01
                  WHERE bname = sy-uname.
      CASE gv_date_format.
        WHEN 1.     "DD.MM.YYYY
          CONCATENATE fv_impdate+6(2) '.'
                      fv_impdate+4(2) '.'
                      fv_impdate+0(4) INTO fv_expdate.
        WHEN 2.     "MM/DD/YYYY
          CONCATENATE fv_impdate+4(2) '/'
                      fv_impdate+6(2) '/'
                      fv_impdate+0(4) INTO fv_expdate.
        WHEN 3.     "MM-DD-YYYY
          CONCATENATE fv_impdate+4(2) '-'
                      fv_impdate+6(2) '-'
                      fv_impdate+0(4) INTO fv_expdate.
        WHEN 4.     "YYYY.MM.DD
          CONCATENATE fv_impdate+0(4) '.'
                      fv_impdate+4(2) '.'
                      fv_impdate+6(2) INTO fv_expdate.
        WHEN 5.     "YYYY/MM/DD
          CONCATENATE fv_impdate+0(4) '/'
                      fv_impdate+4(2) '/'
                      fv_impdate+6(2) INTO fv_expdate.
        WHEN 6.     "YYYY-MM-DD
          CONCATENATE fv_impdate+0(4) '-'
                      fv_impdate+4(2) '-'
                      fv_impdate+6(2) INTO fv_expdate.
      ENDCASE.
    This would convert the date into the format set for user.
    Hope this is helpful.
    Amogh

  • Numbers App - .xls Imported Date Format

    Hi,
    I've just installed Numbers on IOS 7 (IPAD2) and have imported an .xls 97 file. All is good except the dates which have been imported as serial numbers e.g. 1/12/2013 appears as 41609. I have tried formatting the cells as date with any of the variations of the "5 Jan etc" example yet the number remains. The only way I can correct them is to re-enter them manually. The regional (UK) settings for the Ipad are correct so I'm not sure what's causing this, or what it is I've missed - any advice greatly appreciated. Thank you.

    No expereince with LibreOffice, so I can't address how it handles date formating. Its sounds a little like it is still including the time sets and storing them using using a string that Numbers can't convert (and Excel does recognize), but I'm just guessing.
    This might provide a clue: https://help.libreoffice.org/Calc/Date_and_Time_Functions. or at least a starting point for your research.

  • Oracle Streams Update conflict handler not working

    Hello,
    I've been working on the Oracle streams and this time we've to come up with Update conflict handler.
    We are using Oracle 11g on Solaris10 env.
    So far, we have implemented bi-directional Oracle Streams Replication and it is working fine.
    Now, when i try to implement Update conflict handler - it executed successfully but it is not fulfilling the desired functionality.
    Here are the steps i performed:
    Steap -1:
    create table test73 (first_name varchar2(20),last_name varchar2(20), salary number(7));
    ALTER TABLE jas23.test73 ADD (time TIMESTAMP WITH TIME ZONE);
    insert into jas23.test73 values ('gugg','qwer',2000,SYSTIMESTAMP);
    insert into jas23.test73 values ('papa','sdds',2050,SYSTIMESTAMP);
    insert into jas23.test73 values ('jaja','xzxc',2075,SYSTIMESTAMP);
    insert into jas23.test73 values ('kaka','cvdxx',2095,SYSTIMESTAMP);
    insert into jas23.test73 values ('mama','rfgy',1900,SYSTIMESTAMP);
    insert into jas23.test73 values ('tata','jaja',1950,SYSTIMESTAMP);
    commit;
    Step-2:
    conn to strmadmin/strmadmin to server1:
    SQL> ALTER TABLE jas23.test73 ADD SUPPLEMENTAL LOG DATA (ALL) COLUMNS;
    Step-3
    SQL>
    DECLARE
    cols DBMS_UTILITY.NAME_ARRAY;
    BEGIN
    cols(1) := 'first_name';
    cols(2) := 'last_name';
    cols(3) := 'salary';
    cols(4) := 'time';
    DBMS_APPLY_ADM.SET_UPDATE_CONFLICT_HANDLER(
    object_name => 'jas23.test73',
    method_name => 'MAXIMUM',
    resolution_column => 'time',
    column_list => cols);
    END;
    Step-4
    conn to strmadmin/strmadmin to server2
    SQL>
    DECLARE
    cols DBMS_UTILITY.NAME_ARRAY;
    BEGIN
    cols(1) := 'first_name';
    cols(2) := 'last_name';
    cols(3) := 'salary';
    cols(4) := 'time';
    DBMS_APPLY_ADM.SET_UPDATE_CONFLICT_HANDLER(
    object_name => 'jas23.test73',
    method_name => 'MAXIMUM',
    resolution_column => 'time',
    column_list => cols);
    END;
    Step-5
    And now, if i try to update the value of salary, then it is not getting handled by update conflict handler.
    update jas23.test73 set salary = 1500,time=SYSTIMESTAMP where first_name='papa'; --server1
    update jas23.test73 set salary = 2500,time=SYSTIMESTAMP where first_name='papa'; --server2
    commit; --server1
    commit; --server2
    Note: Both the servers are into different timezone (i hope it wont be any problem)
    Now, after performing all these steps - the data is not same at both sites.
    Error(DBA_APPLY_ERROR) -
    ORA-26787: The row with key ("FIRST_NAME", "LAST_NAME", "SALARY", "TIME") = (papa, sdds, 2000, 23-DEC-10 05.46.18.994233000 PM +00:00) does not exist in ta
    ble JAS23.TEST73
    ORA-01403: no data found
    Please help.
    Thanks.
    Edited by: gags on Dec 23, 2010 12:30 PM

    Hi,
    When i tried to do it on Server-2:
    SQL> ALTER TABLE jas23.test73 ADD SUPPLEMENTAL LOG DATA (ALL) COLUMNS;
    it throws me an error,
    Error -
    ERROR at line 1:
    ORA-32588: supplemental logging attribute all column exists

  • "could not be handled because Pages cannot open files in the "data" format."

    I cannot open some files from at least two different friends.   the message that I get is "could not be handled because Pages cannot open files in the “data” format.”. 
    I have OSX 10.9.2
    I have the latest version of Pages 5.2
    Any help is appreciated. I'd like to be able to open files. Thank you.

    Could your friend possibly be using a Mac running OS 9?
    Or one of the early versions of OSX?
    They are the only Systems I know of that don't have file extensions on the files, because they used data forks in the file, something Apple eventually abandoned, in the interests of compatiblity with Windows and UNIX generally.
    I had a look AmigaOS also had a form of file and resource separation, in which the main file does not have an extension.
    Peter

  • How to handle Multiple date formats for the same date field in SQL*Loader

    Dear All,
    I got a requirement where I need to get data from a text file and insert the same into oracle table.
    I am using SQL*Loader to populate the data from the text file into my table.
    The file has one field where I am expecting date date data in multiple formats, like dd/mon/yyyy, yyyy/dd/mon, yyyy/mon/dd, ,mm/dd/yyyy, mon/dd/yyyy.
    While using SQL*Loader, I can see Loading is failing for records where we have formats like yyyy/dd/mon, yyyy/mon/dd, mon/dd/yyyy.
    Is there any way in SQL*Loader where we can mention all these date formats so that this date data should go smoothly into the underlying date column in the table.
    Appreciate your response on this.
    Thanks,
    Madhu K.

    The point being made was, are you sure that you can uniquely identify a date format from the value you receieve? Are you sure that the data stored is only of a particular limited set of formats?
    e.g. if you had a value of '07/08/03' how do you know what format that is?
    It could be...
    7th August 2003 (thus assuming it's DD/MM/RR format)
    or
    8th July 2003 (thus assuming it's MM/DD/RR format)
    or
    3rd August 2007 (thus assuming it's RR/MM/DD format)
    or
    8th March 2007 (thus assuming it's RR/DD/MM format)
    or even more obscurely...
    3rd July 2008 (MM/RR/DD)
    or
    7th March 2008 (DD/RR/MM)
    Do you have any information to tell you what formats are valid that would allow you to be specific and know what date format is meant?
    This is a classic example of why dates should be stored on the database using DATE datatype and not VARCHAR2. It can lead to corruption of data, especially if the date can be entered in any format a user wishes.

  • OA FRAMEWORK DATE FORMAT IS CONFLICTING WITH PERSONAL DATE FORMAT IN APPRAI

    We are using Self service appraisals forms and added a field using oa framework personalizations. The field is available in the View Object and is mapped to an Attribute (DFF) field. The created item is of style Message Input Text with datatype DATE. This generates a small calendar icon right beside the field. On clicking the icon a calendar window pops up and a date can be selected. The date is inserted in the field in the format 23-Sep-2008. My personal preferences (equal to site preference) state that the date format should be DD-MON-YYYY. When I press continue in the appraisal form the date in the field is automatically changed in 2008/09/23. This obviously causes a validation error (screen popup). When I change my personal preference date format to YYYY/MM/DD everything works fine. However, we do not want to use date format YYYY/MM/DD. What setting determines the date format used for validating by OA Framework pages?

    Thank you for your answer. First of all I am a functional consultant using basic personalization functionality to modify the layout of the standard forms and to enable the display of some of the descriptive flexfield attributes (you are correct) we activated on the competence elements entity. I encounter a problem with the dateformat and the fact that it is changing.. Can you be more precise in telling me where to look for format changes? Note that I do not have access to tools like JDeveloper and decided is that we cannot customize/add/substitute VOs.
    CompetenciesCO and AssessmentsAM are the Controller and Application module involved using VO CompetenceElementsVO. (I try to insert a date value in Attribute2).

  • Fm that handle data conversion with respective format

    HI ,
    there is FM that retrive the date like the format that was the input
    like
         01.01.2006
         01012006
    i found the CONVERT_DATE_TO_INTERNAL Fm and other ...
    but it return the date in the format 20060101
    Regards
    Alex
    Moderator message: date formatting questions = FAQ, please search before posting.
    Edited by: Thomas Zloch on Dec 7, 2010 5:07 PM

    check out FM CONVERT_DATE_FORMAT.

  • Problem with date format dd/mm/yyyy. But I need to convert yyyy-mm-dd.

    Dear friends,
    I have the problem with date format. I receiving the date with the format dd/mm/yyyy. But I can upload to MySQL only in the format of yyyy-mm-dd.
    how should I handle this situation, for this I've created these code lines.But I have some problem with these line. please help me to solve this problem.
    String pattern = "yyyy-mm-dd";
    SimpleDateFormat format = new SimpleDateFormat(pattern);
    try {
    Date date = format.parse("2006-02-12");
    System.out.println(date);
    } catch (ParseException e) {
    e.printStackTrace();
    System.out.println(format.format(new Date()));
    this out put gives me Tue Apr 03 00:00:00 IST 2007
    But I need the date format in yyyy-mm-dd.
    regards,
    maza
    thanks in advance.

    Thanks Dear BalusC,
    I tried with this,
    rs.getString("DATA_SCAD1")// where the source from .xls files
    String pattern = "yyyy-MM-dd";
    SimpleDateFormat format = new SimpleDateFormat(pattern);
    try {
    Date date = format.parse("DATA_SCAD1");
    System.out.println(date);
    } catch (ParseException e) {
    e.printStackTrace();
    System.out.println(format.format(new Date()));
    this out put gives me Tue Apr 03 00:00:00 IST 2007
    But I want to display the date format in yyyy-mm-dd.
    regards,
    maza

  • OAF changes Date Format

    Hi
    I need to store a date into a flexfield. We have enabled the Flexfield and there is NO value set attached to it.
    This attribute is already in the VO as a varchar, so we have just added a new column into the page as data type Date and link it to the flexfield column.
    In this page we have a table layout so the user can enter 10 rows before saving them. And this page it just used to punch data into a table, which means, once the user press apply the page saves and clears. The user can not query on that page.
    When entering the first row, we can open the Date picker and we can choose the date and then it populates the column as “DD-MON-YYYY”.
    The problem is:
    When we entering the second row after entering one column the pages changes the format of my date from the previous record to “YYYY-MM-DD”, then after entering any second column the pages clear the date from the previous row.
    Running the page from JDev it shows the following message before clears the flexfield:
    java.text.ParseException: 2011-01-28
    Note we have not extended the VO and not extended the controller.
    My questions are:
    1) Why the Self-Service is change the date format to YYYY-MM-DD even if the profile ICX: Date Format Mask (31-DEC-1999) and my preference is set to DD-MON-YYYY?
    2) How can I avoid this to happen? Is there any way to keep my date as DD-MON-YYYY?
    Thanks,
    Alex

    Alex,
    That was the update from Oracle support, when we raised it,
    But I did the following to handle that, I feel this is not the right way, since we had that issue as SEV1, I did that as a workaround,
    Check this this might help.
    package oracle.apps.xxper.selfservice.appraisals.webui;
    import com.sun.java.util.collections.HashMap;
    import java.io.Serializable;
    import oracle.apps.fnd.common.VersionInfo;
    import oracle.apps.fnd.framework.OAApplicationModule;
    import oracle.apps.fnd.framework.OAException;
    import oracle.apps.fnd.framework.webui.*;
    import oracle.apps.fnd.framework.webui.beans.OAWebBean;
    import oracle.apps.fnd.framework.webui.beans.form.OASubmitButtonBean;
    import oracle.apps.fnd.framework.webui.beans.message.OAMessageCheckBoxBean;
    import oracle.apps.per.selfservice.appraisals.ApprConstants;
    import oracle.apps.per.selfservice.arch.webui.PerOAControllerImpl;
    import oracle.apps.per.selfservice.common.webui.CommonCO;
    import oracle.apps.per.selfservice.compgaps.Constants;
    import oracle.apps.per.selfservice.appraisals.webui.MAFinalRatingsPageCO;
    import oracle.apps.fnd.framework.server.OADBTransaction;
    import oracle.apps.fnd.framework.OAViewObject;
    import java.sql.CallableStatement;
    import java.sql.ResultSet;
    import oracle.jbo.Row;
    import oracle.apps.fnd.framework.webui.beans.message.OAMessageDateFieldBean;
    import oracle.apps.per.selfservice.appraisals.server.AppraisalVORowImpl;
    public class XXPERMAFinalRatingsPageCO extends MAFinalRatingsPageCO
    public void processRequest(OAPageContext pageContext, OAWebBean webBean)
    super.processRequest(pageContext, webBean);
    writeLog("XXPER",pageContext,"Start PR XXPERMAFinalRatingsPageCO ");
    OAMessageDateFieldBean dateBean =(OAMessageDateFieldBean) webBean.findChildRecursive("DeliveryDateTime");
    if(dateBean !=null )
    String dateBeanValue = (String) dateBean.getValue(pageContext) ;
    writeLog("XXPER",pageContext,"dateBean Value "+dateBeanValue);
    if(dateBeanValue !=null)
    if(dateBeanValue.indexOf(".0") !=-1)
    dateBeanValue = dateBeanValue.substring(0,dateBeanValue.length()-2);
    writeLog("XXPER",pageContext,"dateBean Updated Value "+dateBeanValue);
    String dateMaskQry = "SELECT value FROM V$NLS_Parameters WHERE parameter ='NLS_DATE_FORMAT'";
    writeLog("XXPER",pageContext,"dateMaskQry "+dateMaskQry);
    String dateMask = (String) executeSql(dateMaskQry, pageContext, webBean);
    writeLog("XXPER",pageContext,"dateMask : "+dateMask);
    String dateConvertQry = "select to_char(fnd_date.canonical_to_date('"+dateBeanValue+"') ,'"+dateMask+" HH24:MI:SS') from dual";
    writeLog("XXPER",pageContext,"dateConvertQry "+dateConvertQry);
    String convertedDateValue = (String) executeSql(dateConvertQry,pageContext,webBean);
    writeLog("XXPER",pageContext,"convertedDateValue "+convertedDateValue);
    if(convertedDateValue == null )
    convertedDateValue = dateBeanValue;
    dateBean.setValue(pageContext,convertedDateValue);
    writeLog("XXPER",pageContext,"After set the value "+convertedDateValue);
    setAttribute3(pageContext, convertedDateValue);
    writeLog("XXPER",pageContext,"After set the VO value "+convertedDateValue);
    }else
    writeLog("XXPER",pageContext,"dateBean value is null from the bean Get the value from getAttribute3() method");
    dateBeanValue = getAttribute3(pageContext);
    dateBean.setValue(pageContext,dateBeanValue);
    }else
    writeLog("XXPER",pageContext,"dateBean is null ");
    writeLog("XXPER",pageContext,"End PR XXPERMAFinalRatingsPageCO ");
    public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)
    writeLog("XXPER",pageContext,"Start PFR XXPERMAFinalRatingsPageCO ");
    writeLog("XXPER",pageContext,"Event Param "+pageContext.getParameter(EVENT_PARAM));
    OAMessageDateFieldBean dateBean =(OAMessageDateFieldBean) webBean.findChildRecursive("DeliveryDateTime");
    if(dateBean !=null )
    String dateBeanValue = (String) dateBean.getValue(pageContext) ;
    if(dateBeanValue !=null)
    if(dateBeanValue.indexOf(".0") !=-1)
    dateBeanValue = dateBeanValue.substring(0,dateBeanValue.length()-2);
    writeLog("XXPER",pageContext,"dateBean Updated Value "+dateBeanValue);
    String dateMaskQry = "SELECT value FROM V$NLS_Parameters WHERE parameter ='NLS_DATE_FORMAT'";
    writeLog("XXPER",pageContext,"dateMaskQry "+dateMaskQry);
    String dateMask = (String) executeSql(dateMaskQry, pageContext, webBean);
    writeLog("XXPER",pageContext,"dateMask : "+dateMask);
    String dateConvertQry = "select to_char(fnd_date.canonical_to_date('"+dateBeanValue+"') ,'"+dateMask+" HH24:MI:SS') from dual";
    //String dateConvertQry = "select fnd_date.string_to_canonical('"+dateBeanValue+"','"+dateMask+" HH24:MI:SS') from dual";
    writeLog("XXPER",pageContext,"dateConvertQry "+dateConvertQry);
    String convertedDateValue = (String) executeSql(dateConvertQry,pageContext,webBean);
    writeLog("XXPER",pageContext,"convertedDateValue "+convertedDateValue);
    if(convertedDateValue == null )
    convertedDateValue = dateBeanValue;
    dateBean.setValue(pageContext,convertedDateValue);
    writeLog("XXPER",pageContext,"After set the value "+convertedDateValue);
    setAttribute3(pageContext, convertedDateValue);
    writeLog("XXPER",pageContext,"After set the VO value "+convertedDateValue);
    }else
    writeLog("XXPER",pageContext,"dateBean is null ");
    writeLog("XXPER",pageContext,"End PFR XXPERMAFinalRatingsPageCO ");
    super.processFormRequest(pageContext, webBean);
    writeLog("XXPER",pageContext,"End PFR XXPERMAFinalRatingsPageCO (After Super Call )");
    public void writeLog(String moduleName, OAPageContext pageContext, String diagText)
    if(pageContext.isLoggingEnabled(OAWebBeanConstants.STATEMENT))
    System.out.println(moduleName+" : "+diagText);
    pageContext.writeDiagnostics(moduleName,diagText,OAWebBeanConstants.STATEMENT);
    * Method to execute SQL.
    public Object executeSql(String pSqlStmt, OAPageContext pageContext , OAWebBean webBean)
    OADBTransaction tx = pageContext.getApplicationModule(webBean).getOADBTransaction();// (OADBTransaction)getOADBTransaction();
    Object lObject = null;
    // Create the callable statement
    CallableStatement lCstmt = (CallableStatement)tx.createCallableStatement(pSqlStmt, 1);
    ResultSet rs = null;
    try
    rs = lCstmt.executeQuery();
    while(rs.next())
    lObject = rs.getObject(1);
    catch (Exception e)
    //throw OAException.wrapperException(e);
    finally
    try {
    if(rs!=null)
    rs.close();
    if(lCstmt != null)
    lCstmt.close();
    catch(Exception e) {
    throw OAException.wrapperException(e);
    return lObject;
    } // executeSql
    public void setAttribute3(OAPageContext pageContext, String dateValue)
    OAApplicationModule rootAM = pageContext.getRootApplicationModule();
    OAApplicationModule apprAM = (OAApplicationModule)rootAM.findApplicationModule("AppraisalsAM");
    OAViewObject appraisalVO = (OAViewObject)apprAM.findViewObject("AppraisalVO");
    writeLog("XXPER",pageContext,"appraisalVO "+appraisalVO);
    if(appraisalVO !=null)
    AppraisalVORowImpl appraisalVORow = (AppraisalVORowImpl) appraisalVO.getCurrentRow();
    if(appraisalVORow !=null)
    int attrCount = appraisalVO.getAttributeCount();
    writeLog("XXPER",pageContext,"Attrbuute count "+attrCount);
    String[] attributeNames = appraisalVORow.getAttributeNames();
    appraisalVORow.setAttribute3(dateValue);
    public String getAttribute3(OAPageContext pageContext)
    OAApplicationModule rootAM = pageContext.getRootApplicationModule();
    OAApplicationModule apprAM = (OAApplicationModule)rootAM.findApplicationModule("AppraisalsAM");
    String attribute3Value = "N";
    OAViewObject appraisalVO = (OAViewObject)apprAM.findViewObject("AppraisalVO");
    writeLog("XXPER",pageContext,"appraisalVO "+appraisalVO);
    if(appraisalVO !=null)
    AppraisalVORowImpl appraisalVORow = (AppraisalVORowImpl) appraisalVO.getCurrentRow();
    if(appraisalVORow !=null)
    int attrCount = appraisalVO.getAttributeCount();
    writeLog("XXPER",pageContext,"Attrbuute count "+attrCount);
    String[] attributeNames = appraisalVORow.getAttributeNames();
    writeLog("XXPER",pageContext," AppraisalId :- "+ appraisalVORow.getAppraisalId());
    attribute3Value = (String)appraisalVORow.getAttribute3();
    String attribute1Value = (String)appraisalVORow.getAttribute1();//getAttribute2
    String attribute2Value = (String)appraisalVORow.getAttribute2();
    writeLog("XXPER",pageContext," attribute3Value :- "+attribute3Value + " attribute1Value "+ attribute1Value +"attribute2Value "+attribute2Value);
    }else
    writeLog("XXPER",pageContext," appraisalVORow is null ");
    }else
    writeLog("XXPER",pageContext," appraisalVO is null ");
    return attribute3Value;
    }

  • How to extract  different date format in text file

    well, iam new for using regex api(regular expression), In my project i want to extract the different format of date from the text file... date format will be 3rd june 2004, 03-06-2004, june 3rd and so on....
    can any body give me regular expression to extract the date from the text file...
    i will be very grateful..
    kareem

    date format will be 3rd june 2004, 03-06-2004, june 3rd and so on....The only way to do this (without implementing a "mind reader") is to determine in advance all the possible date formats that are possible in your input, and try to interpret each date using each of those formats until one of them passes.
    It's easy enough to handle june 3rd vs 3 june vs 3rd june, but 6/3 vs 3/6, of course, is ambiguous.

Maybe you are looking for

  • Fatal Error while installing

    I recently purchased a second itouch for my daughter and when I plugged it in to my computer it required that I download 9.2. I already had an existing version of itunes on my PC. While installing it stated "There is a problem with this Windows Insta

  • How can I WIPE OUT a previous installation (without erasing entire volume)?

    Like many people (apparently) I had severe problems updating to 10.4.4 (from 10.4.3). I was trying to use a laCie D2 firewire drive as the boot volume. No dice, so I finally reinstalled 10.4.3 on a different drive and have had no problems since. I wo

  • Posting date should not be in future for vendor payments

    Hello Guys, Hope everyone doing fine.... My question is: In F-53 or F-58, Posting should not be greater than entry date or system date. I did write a validation for this. Company code 1000, document type KZ, Transaction Code F-53(FBZ2) or F-58(FBZ4)

  • JRE GIF Images Buffer Overflow Vulnerability

    Hello All, There is an exploit in the wild for a vulnerability covered here: http://www.securityfocus.com/bid/22085/exploit It is on the following site: (Caution! Visiting any page on this site will cause the exploit to be executed, and I'm not convi

  • Takes along time to view a materialized view definition

    Hi, Using owb 11.2.0.3 and takes a long time to see any materialized view definition which is based on a particular table (talking a few minutes compared to over a minute compared to seconds to see other mview definitions. platform aix. 8 million row