InputDate Column Filter Date Format Problem

Hi,
I have an af:table with filterable columns and some of these columns are based on Timestamp VO attributes.
When I enter a date filter - either manually or from the associated date picker, the filter is applied correctly using a date format of dd/MM/yyyy.
However, when the table is subsequently refreshed, the filter value is still present but has been re-formatted to "yyyy-MM-dd hh:mi:ss" format (default format for a Timestamp datatype?). The an error appears in the column filter component - "Error: The date is not in the correct format".
If I want to retain the filter value across queries, how can this be achieved?
My table column is defined as follows:
<af:column sortProperty="#{bindings.ViewDataVO1.hints.LastReadingDate.name}"
                                               filterable="true" sortable="true"
                                               headerText="#{bindings.ViewDataVO1.hints.LastReadingDate.label}"
                                               id="c59"
                                               rendered='#{bindings.ViewDataVO1.hints.LastReadingDate.displayHint != "Hide"}'
                                               displayIndex="#{bindings.ViewDataVO1.hints.LastReadingDate.displayHeight}">
                                        <f:facet name="filter">
                                            <af:inputDate value="#{vs.filterCriteria.LastReadingDate}" id="id4">
                                                <af:convertDateTime
                                                                    pattern="#{bindings.ViewDataVO1.hints.LastReadingDate.format}"/>
                                            </af:inputDate>
                                        </f:facet>
                                        <af:outputText value="#{row.LastReadingDate}" id="ot59">
                                            <af:convertDateTime pattern="#{bindings.ViewDataVO1.hints.LastReadingDate.format}"/>
                                        </af:outputText>
                                    </af:column>I've tried messing with the properties of the af:convertDateTime component, but I'm thinking the problem is in the population of the filter facet inputDate with the vs.filterCriteria.LastReadingDate value. This does not appear to be re-formatted for display - but I don't know how to manipulate this value...
Or is there a better way? This seems more complicated than it should be...?
By the way, I am using JDeveloper 11.1.2.1.0 for my development.
Thanks.

Does it work fine if you change the pattern for convertDateTime?
I.e
change
<f:facet name="filter">
                                            <af:inputDate value="#{vs.filterCriteria.LastReadingDate}" id="id4">
                                                <af:convertDateTime
                                                                    pattern="#{bindings.ViewDataVO1.hints.LastReadingDate.format}"/>
                                            </af:inputDate>
                                        </f:facet>to
<f:facet name="filter">
                                            <af:inputDate value="#{vs.filterCriteria.LastReadingDate}" id="id4">
                                                <af:convertDateTime
                                                                    pattern="dd/MM/yyyy"/>
                                            </af:inputDate>
                                        </f:facet>-Arun

Similar Messages

  • Af:table filter date format : task-flow navigation issue

    hi
    When trying to use the date format configured on the Entity Object, with Format Type as Simple Date and Format as "dd-MM-yyyy", there seems to be a problem when using task-flows.
    The approach involves an explicitly configured attributeValues binding to use in f:validator and af:convertDateTime components in the af:inputDate in the filter facet, as discussed in the forum thread "af:table filter date format"
    at af:table filter date format
    I used JDeveloper 11.1.1.3.0 to create the example application
    in http://www.consideringred.com/files/oracle/2010/TableFilterDateFormatIssueApp-v0.03.zip
    - The page filterEmp.jspx shows expected behaviour, the filter uses the configured date format and there is no problem when navigating to another page and back.
    see the screencast at http://screencast.com/t/CtQ9rsVFH3k
    - The page menuBTFPage.jspx allows for some navigation after using the filter resulting in the filter showing a date in the wrong format, using scenario (sc1)
    -- (sc1-a) : run menuBTFPage.jspx
    -- (sc1-b) : on "menu-btf : menu", click the "do go-filter-emp-btf" link
    -- (sc1-c) : on "filter-emp-btf : filterEmpFragment", filter on HireDate using "10-03-2005"
    -- (sc1-d) : click the "do goReturnSuccess" button
    -- (sc1-e) : back on "menu-btf : menu", click the "do go-filter-emp-btf" link again
    -- (sc1-f) : back on "filter-emp-btf : filterEmpFragment", see the HireDate filter value in the wrong format as "2005-03-10"
    -- (sc1-g) : click the "do goReturnSuccess" button again, which results in an error "The date is not in the correct format."
    see the screencast at http://www.screencast.com/t/ORHauBd3oQ
    questions:
    - (q1) Can the behaviour in scenario (sc1) be reproduced?
    - (q2) Why is the filter value in the wrong date format in step (sc1-f)?
    - (q3) What can be done to have the filter value consistently in the configured date format, so that errors as in step (sc1-g) can be avoided?
    many thanks
    Jan Vervecken

    hi
    First a short summary of relevant aspects of service request 3-2190488381:
    - development has reviewed bug 10193260
    - development identified some code where a pattern was not applied and started fixing the problem
    - out of the blue, development asked "Will clearing out the filter field completely when moving out of ataskflow be an acceptable behavior ?"
    - I pointed out some concerns (even in a phone call with development), but development did not see any alternative not "perceived to be very risky because of the current design", so the question whether the clearing-all-filter-fields approach would be acceptable became superfluous.
    - following this, bug 10193260 suddenly became an enhancement request (for reasons I still don't understand)
    - a workaround was suggested (for behaviour not perceived as a bug), "Clearing the search fields during taskflow exit in the backing bean (in the app)." for which I also received a modified version of my example application TableFilterDateFormatIssueApp-v0.04.zip with an implementation of the suggested workaround
    As an exercise to try an understand the suggested workaround (an because my example application seemed to have been modified using the currently yet-to-be-released JDeveloper 11.1.1.4.0) I re-implemented it in the example application
    at http://www.consideringred.com/files/oracle/2010/TableFilterDateFormatIssueApp-v0.05.zip
    It has a filter-emp-workaround-btf task-flow with a method-call activity on a managed-bean method, responsible for clearing the search fields, resulting in behaviour where the error "The date is not in the correct format." does not occur,
    as can be seen in the screencast at http://screencast.com/t/Nq7TkkRQ
      public void clearFilterFields()
        BindingContainer vBindingContainer =
          BindingContext.getCurrent().getCurrentBindingsEntry();
        DCBindingContainer vDCBindingContainer = (DCBindingContainer)vBindingContainer;
        DCDataControl vDCDataControl = vDCBindingContainer.getDataControl();
        ApplicationModule vApplicationModule = vDCDataControl.getApplicationModule();
        ViewObject vViewObject = vApplicationModule.findViewObject("EmployeesVOVI");
        ViewCriteriaManager vViewCriteriaManager = vViewObject.getViewCriteriaManager();
        vViewCriteriaManager.clearViewCriterias();
        vViewObject.clearCache();
      }Because the managed-bean method requires access to the ADF Model binding layer to get to the View Object instance used for the filtered table, the method-call activity has a page element configured in DataBindings.cpx referring to the same usageId as the page element for the page fragment showing the filtered table. So that both the method-call and view activity depend on one and the same Binding Container (e.i. PageDef file).
    The method-call activity, responsible for clearing the search fields, would need to be called before each task-flow-return activity.
    As there can be multiple view activities with multiple filtered tables in a bounded task-flow, would that result in multiple method-call activities responsible for clearing search fields (all to be called before each task-flow-return activity)?
    It looks like a more general/generic approach is desirable for the suggested workaround to be feasible.
    - (q5) Does the suggested workaround imply (as bug 10193260 is not a bug) that all bounded task-flows with filtered tables should implement it to avoid errors about formatting?
    thanks
    Jan

  • XML Publisher to Excel Report : Date format problem

    Hi,
    I am trying to create an Excel report with XML Publisher. I have an issue with the Date Fomatting.
    In the XML template, I have set the "Date" column in date format. But the excel output report "Date" column returns as "General text" (string) and it is sorted as text, not as date.
    Can anyone please help me out?
    Thanks!!!

    Hi,
    Did this post solve your problem? I have the same issue that I need to solve.
    I have an xsl-fo template with dates in it.
    The dates are in english.
    My excel is setup to use danish.
    When I export to excel it knows the month jan, feb, mar, apr, ... which are the same in danish and english.
    But months where it differs like may (danish maj) the cell is a general text instead of date.
    Is there anyway you can set/transform the date in the xsl-fo template so it does not care about the language in excel?
    Thank you in advance.
    BR Kenneth

  • Date Format problem...

    Hi users,
    Forte version : 2.e.2 and ForteWebSDK
    Datacase : Oracle
    We have a problem with a simple HTML text field which acccepts
    a date. When we try to update the record with some date, the following
    exception occurs:
    24-Jun-1998 04:32:28 : XV01086 : Execute failed for SQL statement in
    project Rap
    tServices, class RaptSqlMethods, method updateActivity, methodId 104,
    line 51, e
    rror from database is:
    ORA-01830: date format picture ends before converting entire input
    string
    The Oracle manual says that the above exception occurs when there are
    some extra characters on that field, which is not the case. In fact,
    we raise our own exception for the cases like : o1-Apr-1997,
    01-apr-97 etc. The correct format is 01-apr-1998.
    Same date soemtimes is added to the database successfully. Waht I mean
    to say that the exception deos not occur consistently.
    We just conevert the String taken from the HTML field into a Forte
    DateTimeData Object and send it to database. May be, the conversion
    part is causing the problem. But, once again the problem is not
    consistent.
    Any ideas in this will be appreciated.
    Thanx in advance
    -Rajeev Talwar
    Get Your Private, Free Email at http://www.hotmail.com
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>

    We had the same problem when our application first went live. The
    default date format for our Oracle database is 'dd-mmm-yy' without the
    time component. The default format for datatype DateTimeData is
    'dd-mmm-yyyy hh:mm:ss'. Since we did not want to change the default date
    format for the Database, we included in our service partitions an Alter
    Session statement to change the NLS_Date_format attribute in Oracle to
    conform to the Forte DateTimeData format. It worked.
    Kam Chow
    Mazda Australia
    -----Original Message-----
    From: Gary F Giger [mailto:[email protected]]
    Sent: Thursday, June 25, 1998 4:11 AM
    To: Rajeev Talwar
    Cc: [email protected]
    Subject: Re: Date Format problem...
    I was having the same problem a few weeks back when I would
    read/write
    dates to Oracle. I was using objects of type DateTimeData and I would
    occasionally get errors like you said you were. I found discovered my
    problem. Sometimes I would process a null date and would get an error.
    So to
    resolve this issue, I simply changes my objects of type DateTimeData to
    type
    DateTimeNullable. This enabled my Forte Application to handle regular
    dates
    as well as null dates. I have not gotten any oracle errors since then
    with
    regards to dates. Hope this helps.
    Rajeev Talwar wrote:
    Hi users,
    Forte version : 2.e.2 and ForteWebSDK
    Datacase : Oracle
    We have a problem with a simple HTML text field which acccepts
    a date. When we try to update the record with some date, the following
    exception occurs:
    24-Jun-1998 04:32:28 : XV01086 : Execute failed for SQL statement in
    project Rap
    tServices, class RaptSqlMethods, method updateActivity, methodId 104,
    line 51, e
    rror from database is:
    ORA-01830: date format picture ends before converting entire input
    string
    The Oracle manual says that the above exception occurs when there are
    some extra characters on that field, which is not the case. In fact,
    we raise our own exception for the cases like : o1-Apr-1997,
    01-apr-97 etc. The correct format is 01-apr-1998.
    Same date soemtimes is added to the database successfully. Waht I mean
    to say that the exception deos not occur consistently.
    We just conevert the String taken from the HTML field into a Forte
    DateTimeData Object and send it to database. May be, the conversion
    part is causing the problem. But, once again the problem is not
    consistent.
    Any ideas in this will be appreciated.
    Thanx in advance
    -Rajeev Talwar
    Get Your Private, Free Email at http://www.hotmail.com
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive<URL:http://pinehurst.sageit.com/listarchive/>
    Gary Giger
    Raytheon Systems Company
    300 Science Park Road
    State College, PA. 16804
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>
    This message has successfully passed virus checking.
    Mazda Australia takes every precaution to ensure email messages are virus free. For complete protection, you should virus test this message.
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>

  • Data format problem

    Hello All
    Can anyone help me to solve this data format problem? On the top of my program, I have declare the two variables "purchasePrice" and "purchaseAmount" as double. I dont know why, the compiler still think I didnt initialize this two variables? I have printed the error message below the code.
    Thanks for your help : )
    Jen
    =============================================================================
    double purchasePrice, purchaseAmount, GPS, total_gain, amount;
    //Find the purchase stock price
         rs = stmt.executeQuery("SELECT Price FROM PORTFOLIO WHERE Username = '"+ username+"' AND Symbol = '"+strsymbol+"'");
         while (rs.next()){
              purchasePrice = rs.getDouble("Price");
    //Calculate the amount of Gain Per Share
    GPS = intask - purchasePrice;
    //Find the purchase stock amount
    rs = stmt.executeQuery("SELECT Amount FROM PORTFOLIO WHERE Username = '"+ username+"' AND Symbol = '"+strsymbol+"'");
         while (rs.next()){
              purchaseAmount = rs.getDouble("Amount");
    //Calculate the amount of Total Gain
    total_gain = amount - purchaseAmount;
    =============================================================================
    Error message:
    variable purchasePrice might not have been initialized
    [javac] GPS = intask - purchasePrice;
    [javac] ^
    variable purchaseAmount might not have been initialized
    [javac] total_gain = amount - purchaseAmount;
    [javac] ^
    [javac] 2 errors

    Instance and class variables are automatically initialized to their default values if they are not initialized explicitly, but local variables are not. They have to be initialized explicitly before they can be referenced.
    In your code:
        while (rs.next()){
            purchasePrice = rs.getDouble("Price");
        ...purchasePrice is initialized only if rs.next() returns true. purchaseAmount has the same problem. To avoid this problem, you could declare them by:
    double purchasePrice = 0;
    double purchaseAmount = 0;

  • Date Format problem in a JTable, help plzzz !!!

    Hi,
    i have a JTable which contains multiple date columns, and more particulary, Timestamp columns.
    I mean this format : yyyy-mm-dd hh:mm:ss.fffffffff
    I only need hh:mm:ss informations for my JTable.
    The problem is when i retrieve the datas in the JTable (which has a bean Select for model), the date column has this format : yyyy-mm-dd (only the date), and the time is not present !
    What must i do to have only a part of the timestamp data in the column ??
    Thanks in advance
    Steve

    If you want to format data in any way other than the default in a JTable, you need a table cell renderer. Sun's tutorial on how to use JTables explains them.

  • Date format problem in excel format

    Hi,
    I am uploading the date field  from excel to program.
    My problem is in date format.
    I am gettting the date format in ddmmyyyy if it is 01012006 then my excel sheet contains the date as 1012006 i.e '0' initial zero is truncated in the excel sheet .
    Now how can i use this date in my program i.e i have to convert into date as per program requirements like dd.mm.yyyy  .How can i convert.
    Thanks and regards,
    shyla

    Hi Shyla,
    if the provided excel sheet contains date in format "20122006" the field is considered as a number format.
    In this case you can do the following select the whole column and go to format/cells. Choose the "custom" category on the Number tab and
    enter zeros in eight digits, i.e. 00000000 under "Type:".
    This should solve your problem before uploading the data into SAP.

  • CLIENT_OLE2 date formatting problem while reading from Excel

    I have installed webutil package and tested that everything works by running webutil_demo as well as WU_TEST_106 form. Then I had implemented reading from Excel sp. sheet using Oracle note 813535.1 (This note has OLE2 code sample on how to read an Excel file). Everything fine till now. The problem started when I have a date fiield to read from Excel. The field where the value is going to has format mask of 'DD-MM-RRRR'. When the date is displayed in the form, it shows '01-AUG-0009' instead of '01-AUG-2009'. I tried changing the date format to different formats in Excel but no go. I found one blog which stated that treat the date as number and use e.g. "cell_date_value:=to_date('01/01/1900','DD/MM/YYYY')+client_OLE2.get_num_property(cel,,'Value')+2" but it too did not change the display. Then I tried debugging and stepping through the code..the only thing I noticed that OLE2 function displayed the date with 2 digit year as 09 and when the code completed execution, the date went back to '01-AUG-0009'. Casting with 4 digit year at every step in the code is not helping to change final date display correctly. Any idea?!!!

    Hi,
    While reading the date column from excel, try using
         m_col_val := OLE2.get_char_property(Workcell,'Text');
    Instead of
         m_col_val := OLE2.get_char_property(Workcell,'Value');
    I think you problem will be solved...
    hello...i meant client_OLE2
    Regards
    Dora
    Edited by: Dora on Sep 16, 2009 11:05 AM

  • Data format problem with Write to Spreedsheet File

    I have a problem with the data format with Write to spredsheet file.
    I have an N*3 array, where the 3 elements in each row should has different length. When I used Write to spreedsheet file,
    it can only save the three data in one format. How can I save them in the format of "%0.8f %0.3f %0.2f"?
    Thanks for your help.

    Hi powerplay,
    another solution may be to convert column-wise using "number to fractional string", then interleaving resulting arrays and again using "array to spreadsheet string" (with "space" as separator).
    Many ways lead to Rome
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome

  • Date format problem in forms?

    I basically want the following.. in a date text item.
    1st Jan 2008
    if DD is 1 character and
    20th Jan 2008 if DD is 2 characters.
    not
    01st Jan 2008
    20th Jan 2008
    In SQL i can do this with date format 'FMddth Mon, YYYY'
    In forms though this does not work.. any ideas?
    Thanks

    Looks like the pl/sql version used by Forms has a flaw in handling the fm and ddth parts of the date format together.
    If it is a display-only column, you can change its datatype to char, remove the format mask, and instead, change the Column Name property to something like:
    to_char(date_column,'fmddth Mon YYYY')

  • Quicken 2007 date format problem in Mavericks

    Objective: Get date format in dd/mm/yyyy format in Quicken 2007 (Lion compatible version).
    Current OS: Mavericks 10.9.4
    Hardware: Retina MacBook Pro & iMac 27" 3.2Ghz
    Problem:
    On my rMBP with Mavericks 10.9.4, I’m able to get Quicken 2007 data in dd/mm/yyyy format, as desired.
    On my new iMac (late 2013) with 10.9.4, Quicken recognises the System date formats dd/mm/yyyy (setting up a new register shows System date format) but the registers and data are all in m/d/yy.
    Quicken prefs are set to Canadian, so date formats should automatically be in dd/mm/yyyy, but aren't.
    The Quicken data file is identical on both Macs. The original file goes back to 1991, and has been through all Mac OS iterations since then.
    Pre-Lion, I remember that the workaround was to set the Language & Region to something (English / US, don’t remember which) and then change date formats. Anyway, the dd/mm/yyyy stuck, through Lion and Mavericks on my rMBP, but is causing a problem in the iMac.
    My guess is that Quicken is unable to / blocked out from accessing System date formats in Mavericks 10.9.4.
    Wondering if there’s some way to make Quicken access the Mavericks System date format, and stick to it?
    Possible approach: If some expert in these forums knows how Mavericks works under the hood, how it allows other apps access to System Prefs like date formats etc., perhaps a script or Terminal command could force Quicken 2007 to recognise and accept date formats from System Prefs (Language & Regional settings).
    I'd really appreciate the help; needless to say, the Quicken data is vital to my work.

    Hi Marlon,
    The OS Local definitions. Different countries have different date formats for their location. Check the date format of the OS CultureInfo settings.
    Regards,
    Vítor Vieira

  • Date format Problem in forms&reports Services 10g

    Hi Dears,
    I Faced a problem during running reports ( i am using forms& Reports Services 10g), when i pass the parameters via parameter form to the report (built in forms10g Rel 2.0) its appearing in arabic like (25-يناير-2010) as my Date Formate is (DD-YYYY-MON) and NLS_LANG parameter is defined as Arabic_Saudi arabia.AR8MSWIN1256 so as a result report is not running due to unknown Date formate, how can i change the Same Date format (DD-YYYY-MON) to appear in english like (25-2010-JAN)
    Thanks

    You could specify the parameter as type VARCHAR2, explicitly cast it (maybe to DD.MM.YYYY) when you pass it from forms and cast it back in your query, like TO_DATE(:P_PARAM, 'DD.MM.YYYY')

  • Date Format problem in ABAP Proxy

    Hi All,
    We have a Inbound ABAP proxy which recieves data from XI.
    We use a date field in that which is defined as DATS datatype.
    When we trigger the interface from XI with date in format YYYYMMDD, we are getting an exception.
    when the date is sent in format YYYY-MM-DD, the interface is run successfuly.
    when we test the interface in SPROXY transaction the date is displayed in YYYY-MM-DD format.
    does it have anything to do with the defenition of the date format in XI?
    I want to know whether DATS format in XI is different from ABAP?
    should the date that is sent from XI be in YYYY-MM-DD format all the time.
    Kindly suggest a solution for the date problem when it is passed from XI to ABAP proxy

    Hi Uday,
    Check the pattern used in XI/PI for the date definition.
    If it's set to:
         pattern="[0-9]-[0-9]-[0-9]"
    Then it will enforce the pattern. You could try changing the pattern in XI to exclude the hyphen then you have a normal DATS format.
    Regards, Trevor

  • Date formating Problem

    Hi Experts,
    Please guide me i am alone here.
    I Developed one BDC program For IW51.
    I want to wirite the condition for already exitting record based on the date.
    So i select the data from VIQMEL(view).
    I am getting the problem with date format, when i am selecting the data the date format coming like yymmdd,
    but the tcode updating the format is like ddmmyy. 
    please guide me how can i solve this problem.
    Please give any sample code for this scnario.
    Thanks Advance
    Edited by: krishnab121 on Feb 18, 2011 6:32 AM
    Moderator Message: Date related questions are not allowed.
    Edited by: kishan P on Feb 18, 2011 11:27 AM

    Hi,
    <<removed by moderator>>
    Close the thread if answered correctly.
    Regards,
    Saurabh
    MOderator Message: Do NOT answer basic questions. Do NOT ask the Poster to close his questions. Thats not your job and thats against the rules of the forum.
    Edited by: kishan P on Feb 18, 2011 11:28 AM

  • Date Format Problem in Custom Report

    Dear all ,
    I am generating SQL statement for the report , i am passing (param_date from ) and (param_date to) to get data from SITs , and there is tow segments in the SITs : (SIT_date from ) and (SIT_date to) also ,, getting the data from the SITs by comparing the dates for the SIT and the parameters ,,, i am facing problem in the date format , ,, could any one please help me what is the format that i can compare the between dates in the SIT and the Parameters ???
    Best Regards
    Edited by: user6781803 on Jan 3, 2010 7:28 AM

    >
    ... i am facing problem in the date format ...
    >
    What is the problem ? Pl also post full versions of your OS and EBS.
    HTH
    Srini

Maybe you are looking for

  • Enable/disable operation buttons according to the selected row in table?

    Hi, I used JDev 11.1.1.2.0 On my main page, it has a query section and display search result to a table component, and also has some operation buttons like (update/delete) on the toolbar. I want to enable/disable the operation buttons according to so

  • Is it possible to control the duration of a video clip in IMovie? Speed

    Is it possible to control the duration of a video clip in IMovie? Speed it up/slow it down?

  • Moving Photos in LR 4

    I have installed a new H/D and want to make it a dedicated photo drive and scratch disk for CS5. I moved my cataolog onto the new drive and I had to have LR "point" to the new location in order to open so that's all good now. What's the procedure to

  • Smartform Borders

    Hi Friends, In Smartform main window i'm using tables. Now my problem is that the framed pattern is working but lower/upper/right/left frame is not working. in individual table cells also I've give lower frame but it's not working. Thanks & Regards,

  • Error - oracle.apps.fnd.framework.OAException: java.lang.ClassCastException

    Hello All, I have created an employee search page based on the OA Framework tutorial. I could run the page from the JDeveloper(9.0.3 OA Extension). And wanted to call the page from 11.5.10 applications. Steps followed to call the page from 11.5.10 ap