Parsing Issue in Filter For Date Format

Hi Folks,
I am having Parsing Issue on "Key Date" Object in Universe. See the Error and Code below for your review
Error: Parse Failed: Exception: DBD, The value entered is not valid. It must adhere to one of the following formats.
YYYYMMDD
DD.MM.YYYYState:N/A
Code:
<OPERATOR VALUE="AND"><OPTIONAL><FILTER KEY="0I_DAYIN"><CONDITION OPERATORCONDITION="Between"><CONSTANT TECH_NAME="@Prompt('Day Interval From','A','Calendar Day\LovDay IntervalBase',mono,primary_key)"/><CONSTANT TECH_NAME="@Prompt('Day Interval To','A','Calendar Day\LovDay IntervalBase',mono,primary_key)"/></CONDITION></FILTER></OPTIONAL><FILTER KEY="0P_KEYDA"><CONDITION OPERATORCONDITION="Equal"><CONSTANT TECH_NAME="@Prompt('Key Date','D',,mono,free)"/></CONDITION></FILTER></OPERATOR>
This universe is created by someone else and client need to modify it with a calendar but i did not modify it yet however its already giving me the hard time. Kindly advise, any kind of help will be appreciated
Thanks

Hi,
With the information provided I cannot for sure get to the error but here is what I would check.
Firstly, I was wondering if the 5th parameter in the @Prompt can be Primary_Key. I thought it would be either free or constrained.
Secondly, please the LOV values for the @ prompt are being populated from 'Calendar Day\LovDay IntervalBase'. So I would check the date format being used there.
Third, the To and From dates are alphaneumeric and not dates, so I am not sure how the comparision would happen.
Hope this helps.
Regards,
Madhur

Similar Messages

  • Input Value long enough for date format ,Error in executing parallel query

    Hi,
    My Table: ANML( ID, STATUS,B_DATE,B_MONTH,B_YEAR, DEATH_DATE)
    status 1 for alive and 2 for dead.
    i wrote a view to get age.
    as
    create or relace view view1 as
    select top."ID",top."STATUS",top."DOB",top."DEATH_DATE",top."ANML_AGE",top."DAYSDIFF",
    CASE
    WHEN anml_age < 1
    THEN 'D'
    ELSE 'M'
    END age_unit,
    CASE
    WHEN anml_age < 1
    THEN TO_CHAR (daysdiff || ' Day(s)')
    WHEN anml_age < 12
    THEN TO_CHAR (anml_age || ' Month(s)')
    WHEN MOD (anml_age, 12) = 0
    THEN TO_CHAR (ROUND (anml_age / 12, 0) || ' Year(s) '
    ELSE TO_CHAR ( ROUND (anml_age / 12, 0)
    || ' Year(s) '
    || MOD (anml_age, 12)
    || ' Month(s)'
    END age_string
    from
    (SELECT a.*,
    CASE WHEN status IN ( 1)
    THEN FLOOR(MONTHS_BETWEEN(TRUNC(SYSDATE),dob))
    WHEN death_date IS NOT NULL AND status IN (2)
    THEN FLOOR(MONTHS_BETWEEN(death_date,dob))
    END anml_age,
    CASE WHEN status IN (1)
    THEN FLOOR(TRUNC(SYSDATE)-TRUNC(dob))
    WHEN death_date IS NOT NULL AND status IN (2)
    THEN FLOOR(TRUNC(death_date) - TRUNC(dob))
    END daysdiff
    from (
    SELECTanml.id, status,
    TO_DATE ( DECODE (b_date,
    NULL, 1,
    b_date
    || '-'
    || DECODE (b_month,
    NULL, 1,
    b_month
    || '-'
    || b_year,
    'dd-mm-yyyy'
    ) DOB,
    death_date
    FROM anml
    WHERE b_year IS NOT NULL
    ) a) top
    when i tried to fetch all values from view its working fine.
    But when i tried to fetch values based on condition like as follows,
    select * from view1 where anml_age > 20 and anml_age<30
    I am getting error like:
    Input Value long enough for date format and Error in executing parallel query
    Please tell me wht is wrong.

    Here is your formatted code
    create or relace view view1 as
    select top."ID",top."STATUS",top."DOB",top."DEATH_DATE",top."ANML_AGE",top."DAYSDIFF",
    CASE
    WHEN anml_age < 1
    THEN 'D'
    ELSE 'M'
    END age_unit,
    CASE
    WHEN anml_age < 1
    THEN TO_CHAR (daysdiff || ' Day(s)')
    WHEN anml_age < 12
    THEN TO_CHAR (anml_age || ' Month(s)')
    WHEN MOD (anml_age, 12) = 0
    THEN TO_CHAR (ROUND (anml_age / 12, 0) || ' Year(s) '
    ELSE TO_CHAR ( ROUND (anml_age / 12, 0)
    || ' Year(s) '
    || MOD (anml_age, 12)
    || ' Month(s)'
    END age_string
    from
    (SELECT a.*,
    CASE WHEN status IN ( 1)
    THEN FLOOR(MONTHS_BETWEEN(TRUNC(SYSDATE),dob))
    WHEN death_date IS NOT NULL AND status IN (2)
    THEN FLOOR(MONTHS_BETWEEN(death_date,dob))
    END anml_age,
    CASE WHEN status IN (1)
    THEN FLOOR(TRUNC(SYSDATE)-TRUNC(dob))
    WHEN death_date IS NOT NULL AND status IN (2)
    THEN FLOOR(TRUNC(death_date) - TRUNC(dob))
    END daysdiff
    from (
    SELECTanml.id, status,
    TO_DATE ( DECODE (b_date,
    NULL, 1,
    b_date
    || '-'
    || DECODE (b_month,
    NULL, 1,
    b_month
    || '-'
    || b_year,
    'dd-mm-yyyy'
    ) DOB,
    death_date
    FROM anml
    WHERE b_year IS NOT NULL
    ) a) top

  • Obiee 11g upgrade issue for date format

    Hi,
    I am facing a date format issue with obiee 11g report. This statement cast(cast(current_date as char) as timestamp) is failing with "not a valid month" error in obiee 11g. This worked fine with obiee 10g.
    I am basically trying to set the date to 12:00:00 am of the sysdate. Below is what I am trying to achieve:
    timestampadd(sql_tsi_hour, 1, cast(cast(current_date as char) as timestamp)))
    the above statement fails in obiee 11g.
    Thanks for your help,
    AP

    I dont think you need any functions to get the required output, try to set the date format as below
    [FMT:timeStampShort]
    If helps mark
    Thanks
    Edited by: Srini VEERAVALLI on Apr 23, 2013 4:18 PM
    I think with format and then the below should work with no issues.
    timestampadd(sql_tsi_hour, 1,current_date)
    I think you are wasting time by posting here, just do it. You no need any ones permissions to do it ;)
    Edited by: Srini VEERAVALLI on Apr 24, 2013 8:55 AM

  • Class Cast Exception for Date Format .

    Hi Friends ,
    I am getting a error for casting type from Object to Date type .
    Could you please some one help me . I am using a prepared statement in OAF for inserting a data .
    All fields are inserting except Date format .
    My code in controller as follows :
    try {    String StartDate=row.getAttribute("StartDate").toString();
    // String StartDate="30-Apr-2011";
    DateFormat formatter ;
    Date StartDate1;
    formatter = new SimpleDateFormat("dd-MMM-yy");
    StartDate1 = (Date)formatter.parse(StartDate);
    //System.out.println("Today is " +date );
    pstmt.setDate(12,StartDate1);
    } catch (ParseException e)
    {System.out.println("Exception :"+e);    }
    Thanks in Advance ,
    Keerthi

    Thanks so Much for the quick response .
    Exception Details.
    oracle.apps.fnd.framework.OAException: java.lang.ClassCastException at oracle.apps.fnd.framework.OAException.wrapperException(OAException.java:888) at oracle.apps.fnd.framework.webui.OAPageErrorHandler.prepareException(OAPageErrorHandler.java:1145) at oracle.apps.fnd.framework.webui.OAPageErrorHandler.processErrors(OAPageErrorHandler.java:1408) at oracle.apps.fnd.framework.webui.OAPageBean.processFormRequest(OAPageBean.java:2637) at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:1659) at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:497) at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:418) at OA.jspService(OA.jsp:40) at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56) at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:317) at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:465) at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:379) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:727) at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:306) at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:767) at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:259) at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:106) at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:803) at java.lang.Thread.run(Thread.java:534) ## Detail 0 ## java.lang.ClassCastException at SONY.oracle.apps.inv.xx_slapg.webui.ServiceRequestCO.processFormRequest(ServiceRequestCO.java:153) at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:799) at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:363) at oracle.apps.fnd.framework.webui.OAPageLayoutHelper.processFormRequest(OAPageLayoutHelper.java:1118) at oracle.apps.fnd.framework.webui.beans.layout.OAPageLayoutBean.processFormRequest(OAPageLayoutBean.java:1579) at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:995) at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:961) at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:816) at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:363) at oracle.apps.fnd.framework.webui.beans.form.OAFormBean.processFormRequest(OAFormBean.java:395) at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:995) at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:961) at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:816) at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:363) at oracle.apps.fnd.framework.webui.beans.OABodyBean.processFormRequest(OABodyBean.java:363) at oracle.apps.fnd.framework.webui.OAPageBean.processFormRequest(OAPageBean.java:2633) at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:1659) at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:497) at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:418) at OA.jspService(OA.jsp:40) at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56) at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:317) at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:465) at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:379) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:727) at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:306) at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:767) at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:259) at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:106) at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:803) at java.lang.Thread.run(Thread.java:534) java.lang.ClassCastException at SONY.oracle.apps.inv.xx_slapg.webui.ServiceRequestCO.processFormRequest(ServiceRequestCO.java:153) at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:799) at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:363) at oracle.apps.fnd.framework.webui.OAPageLayoutHelper.processFormRequest(OAPageLayoutHelper.java:1118) at oracle.apps.fnd.framework.webui.beans.layout.OAPageLayoutBean.processFormRequest(OAPageLayoutBean.java:1579) at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:995) at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:961) at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:816) at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:363) at oracle.apps.fnd.framework.webui.beans.form.OAFormBean.processFormRequest(OAFormBean.java:395) at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:995) at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:961) at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:816) at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:363) at oracle.apps.fnd.framework.webui.beans.OABodyBean.processFormRequest(OABodyBean.java:363) at oracle.apps.fnd.framework.webui.OAPageBean.processFormRequest(OAPageBean.java:2633) at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:1659) at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:497) at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:418) at OA.jspService(OA.jsp:40) at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56) at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:317) at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:465) at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:379) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:727) at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:306) at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:767) at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:259) at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:106) at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:803) at java.lang.Thread.run(Thread.java:534)
    Here is my code .
    java.util.Date StartDate=(java.util.Date)row.getAttribute("StartDate");
    ------------------------------------------------------------------------------------------------

  • NEED ALTER TABLE ALTER COLUMN FOR DATE FORMAT

    Need something like this :
    ALTER TABLE ABC
    ALTER COLUMN DATE1 AS (DD/MM/YYYY)
    need to appear in this format (29/03/2014) in the table.
    also needs to be recorded in DB in that format.

    changed system date format, works. Thanks!
    You should always store values as dates itself in date/datetime related field in SQLServer
    The formatting can very easily be done in your front end (presentation layer) using format function
    Even in T-SQL you can use CONVERT or FORMAT functions to get the date values in the format you want
    Please Mark This As Answer if it solved your issue
    Please Mark This As Helpful if it helps to solve your issue
    Visakh
    My MSDN Page
    My Personal Blog
    My Facebook Page
    I don't follow you? Anyway, Olaf Helper's answer was the solution.
    SQL Server has a data type called DATETIME. To correctly query dates, it is easier to use this as it allows the SQL engine to do all the calculations for you, also the canonical format for dates in any database language is YYYY-MM-DD, this ensures correctly
    tiered dates that are stored in the right order. The way you store data and the way you display it should be kept as two seperate entities. This is the ISO standard and has been thoroughly investigated ...alot to say the least. This is where the term "front-end"
    and "back-end" developers come from, and also the distinction between server-side and client-side scripting.
    To cut a long story short, take the advice of the multiple professionals here, and follow standards otherwise you'll find yourself stuck, or worse, your legacy code will make someone tear their hair out.

  • Interactive report filter for date not working correctly

    Hi,
    I am having an interactive report. I tried to give a filter for a column(created_on) as created on>29-oct-2009 17:17
    but i am getting the row containing created on as *29-oct-2009 17:17* in the report result. How can i correct this
    problem
    Thanks,
    TJ

    Hi,
    I think it is because seconds.
    So it is 29-oct-2009 17:17:00 and your record is e.g. 29-oct-2009 17:17:02
    br, Jari
    Edit
    You can use trunc function in your select so that it round date to minutes
    TRUNC(created_on,'MI') AS created_onBr, Jari
    Edited by: jarola on Nov 5, 2009 3:02 PM

  • Sum values in last row for date format "hh24:mi"

    Hi,
    I have a big problem creating a sum row with date data.
    I created a sql view where the result looks like that:
    SELECT category_name,
    user_name,
    b_mmyyyy,
    b_1, ..., b_31
    FROM view_category_user_booking
    category_name, user_name, b_1, ..., b_31
    category1, user1, 122008, 01:00, ..., 03:30
    category2, user1, 122008, 02:00, ..., 01:00
    category3, user1, 122008, 00:00, ..., 00:15My goal is to integrate a sum row at the end for the columns b_1 ... b_31
    category_name, user_name, b_1, ..., b_31
    category1, user1, 122008, 01:00, ..., 03:30
    category2, user1, 122008, 02:00, ..., 01:00
    category3, user1, 122008, 00:00, ..., 00:15
    Sum, user1, 122008, 03:00, ..., 04:45I tried it like that:
    select decode(grouping(category_name),1,'Summe',category_name),
    sum(to_number(replace(b_1,':',','))) as b_1,
    sum(to_number(replace(b_31,':',','))) as b_31
    from category_user_booking
    where user_name = 'user1'
    and b_mmyyyy = '122008'
    group by rollup(category_name)But the result isn't really successful
    category_name, b_1, b_31
    category1, 1, 3,3
    category2, 2, 1
    category3, 0, 0,15
    Sum, 3, 4,45Is there somebody with an idea?
    Thanks ahead,
    Tobias

    Hi Avinash,
    the problem is not the grouping it is the date format.
    Instead of a value like 5,4 > I want 05:40 or 1,75 > I want 02:15 in the sum value.
    In my table all time values are saved in the format hh24:mi.
    I don't know how to get that via a sql statement.
    Output I want:
    category_name, user_name, b_1, ..., b_31
    category1, user1, 122008, 01:00, ..., 03:30
    category2, user1, 122008, 02:00, ..., 01:00
    category3, user1, 122008, 00:00, ..., 00:15
    Sum, user1, 122008, 03:00, ..., 04:45Regards,
    Tobias

  • Validating JTextField for Date Format

    hello,
    everybody.
    i am trying to perform a validation on text field, i.e if the input is in a date format then it will show, other wise it will consume the character.
    please help me out of this problem i am stucked with it.
    waitng for reply. the following is my code.
    import javax.swing.*;
    import java.awt.event.*;
    import java.awt.*;
    import java.util.*;
    import java.text.*;
    public class RilJDateField implements KeyListener
         JFrame frame;
         JPanel panel;
         JLabel label;
         JTextField text;
         GridBagLayout gl;
         GridBagConstraints gbc;
         Date date = new Date();
         public static void main(String a[])
              new RilJDateField();
         public RilJDateField()
              panel = new JPanel();
              gl = new GridBagLayout();
              gbc = new GridBagConstraints();
              panel.setLayout(gl);
              label = new JLabel("Only Date Format");
              text = new JTextField(5);
              gbc.anchor = GridBagConstraints.NORTHWEST;
              gbc.gridx = 1;
              gbc.gridy = 1;
              gl.setConstraints(label,gbc);
              gbc.anchor = GridBagConstraints.NORTHWEST;
              gbc.gridx = 2;
              gbc.gridy = 1;
              gl.setConstraints(text,gbc);
              panel.add(label);
              panel.add(text);
              text.addKeyListener(this);
              text.requestFocus();
              frame = new JFrame("RilJDateField Demo");
              frame.getContentPane().add(panel);
              frame.addWindowListener(new WindowAdapter() {
                        public void windowClosing(WindowEvent we)
                             System.exit(0);
              frame.setSize(300,300);
              frame.setVisible(true);
         public void keyTyped(KeyEvent ke)
         public void keyPressed(KeyEvent ke)
              DateFormat df;
              df = DateFormat.getDateInstance();
              df = (DateFormat) ke.getSource();
              if(!(df.equals(date)))
                   ke.consume();
         public void keyReleased(KeyEvent ke)
    }

    hi,
    thanks very much, u gave me great idea.
    according to ur suggestion i used JFormattedTextField as well as SimpleDateFormat, but while giving keyevent i am getting the error,
    so please if possible reply for this.
    the error is
    java.lang.ClassCastException
         at RilJDateField.keyTyped(RilJDateField.java:61)
         at java.awt.Component.processKeyEvent(Unknown Source)
         at javax.swing.JComponent.processKeyEvent(Unknown Source)
         at java.awt.Component.processEvent(Unknown Source)
         at java.awt.Container.processEvent(Unknown Source)
         at java.awt.Component.dispatchEventImpl(Unknown Source)
         at java.awt.Container.dispatchEventImpl(Unknown Source)
         at java.awt.Component.dispatchEvent(Unknown Source)
         at java.awt.KeyboardFocusManager.redispatchEvent(Unknown Source)
         at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(Unknown Source)
         at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(Unknown Source)
         at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(Unknown Source)
         at java.awt.DefaultKeyboardFocusManager.dispatchEvent(Unknown Source)
         at java.awt.Component.dispatchEventImpl(Unknown Source)
         at java.awt.Container.dispatchEventImpl(Unknown Source)
         at java.awt.Window.dispatchEventImpl(Unknown Source)
         at java.awt.Component.dispatchEvent(Unknown Source)
         at java.awt.EventQueue.dispatchEvent(Unknown Source)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.run(Unknown Source)and my source code is
    import javax.swing.*;
    import java.awt.event.*;
    import java.awt.*;
    import java.util.*;
    import java.text.*;
    public class RilJDateField implements KeyListener
         JFrame frame;
         JPanel panel;
         JLabel label;
         JFormattedTextField text;
         GridBagLayout gl;
         GridBagConstraints gbc;
         Date date = new Date();
         SimpleDateFormat formatter;
         public static void main(String a[])
              new RilJDateField();
         public RilJDateField()
              panel = new JPanel();
              gl = new GridBagLayout();
              gbc = new GridBagConstraints();
              panel.setLayout(gl);
              label = new JLabel("Only Date Format");
              text = new JFormattedTextField();
              text.setColumns(10);
              formatter = new SimpleDateFormat("dd mm yyyy");
              gbc.anchor = GridBagConstraints.NORTHWEST;
              gbc.gridx = 1;
              gbc.gridy = 1;
              gl.setConstraints(label,gbc);
              gbc.anchor = GridBagConstraints.NORTHWEST;
              gbc.gridx = 2;
              gbc.gridy = 1;
              gl.setConstraints(text,gbc);
              panel.add(label);
              panel.add(text);
              text.addKeyListener(this);
              text.requestFocus();
              frame = new JFrame("RilJDateField Demo");
              frame.getContentPane().add(panel);
              frame.addWindowListener(new WindowAdapter() {
                        public void windowClosing(WindowEvent we)
                             System.exit(0);
              frame.setSize(300,300);
              frame.setVisible(true);
         public void keyTyped(KeyEvent ke)
              Date date = (Date) ke.getSource();
              if(!(date.equals(formatter)))
                   ke.consume();
         public void keyPressed(KeyEvent ke)
         public void keyReleased(KeyEvent ke)
    }

  • Test String for date format

    Is there a function that reads a string and can return yes/no if the string matches a specified date format (example: mm/dd/yy)? I wish to avoid parsing the string character by character.
    Thanks,
    George

    BTW,
    I used the following example code available from this site. I was able to easily modify it to sovle my problem.
    try {
    SimpleDateFormat formatter =
    new SimpleDateFormat("EEEE, MMMM dd, yyyy");
    Date d = formatter.parse(
    "Tuesday, January 03, 1956");
    formatter = new SimpleDateFormat(
    "EE, MMM d, yy");
    d = formatter.parse("Tue, Jan 3, 56");
    formatter = new SimpleDateFormat(
    "EE, MM d, yy");
    d = formatter.parse("Tue, 01 3, 56");
    process(d);
    } catch (ParseException e) {
    On to the next challenge...
    George

  • Issue related with the Date Format --- error when activating the DSO

    Hi Friends..
    plz help me to fix the issue ...im getting when activating the DSO...
    Actually im not getting error when loading the data thru DTP..im facing this issue while activating the DSO..
    is there any routine to solve this or i have to go for data selection in info package ......
    I have searched in the forum also..but im not able to fix..plz help
    Error when assigning SID: Action VAL_SID_CONVERT, InfoObject 0CRMPOSTDAT*
      Value '31122009' of characteristic 0DATE is not plausible
    Error when assigning SID: Action VAL_SID_CONVERT, InfoObject ZKITRDT*
      Value '01/20/20' of characteristic 0DATE is not a number with 000008 spaces
    Error when assigning SID: Action VAL_SID_CONVERT, InfoObject ZMNS_DATE*
      Value '20101502' of characteristic 0DATE is not plausible
    Error when assigning SID: Action VAL_SID_CONVERT, InfoObject 0CRM_EXCDAT*
      Value '31122009' of characteristic 0DATE is not plausible
    Error when assigning SID: Action VAL_SID_CONVERT, InfoObject 0CRM_PRIDAT*
      Value '31122009' of characteristic 0DATE is not plausible
    Error when assigning SID: Action VAL_SID_CONVERT, InfoObject ZCOMPDAT*
      Value '31122009' of characteristic 0DATE is not plausible
    Error when assigning SID: Action VAL_SID_CONVERT, InfoObject ZDUEDAT*
      Value '20101402' of characteristic 0DATE is not plausible
    Thanks
    Baskar
    Edited by: tjgnanabaskar on Aug 6, 2010 5:35 PM

    Hi Friends..
    plz help me to fix the issue ...im getting when activating the DSO...Actually im not getting error when loading the data thru DTP..im facing this issue while activating the DSO..is there any routine to solve this or i have to go for data selection in info package ......I have searched in the forum also..but im not able to fix..plz help
    Error when assigning SID: Action VAL_SID_CONVERT, InfoObject 0CRMPOSTDAT
    Value '31122009' of characteristic 0DATE is not plausible
    Error when assigning SID: Action VAL_SID_CONVERT, InfoObject ZKITRDT
    Value '01/20/20' of characteristic 0DATE is not a number with 000008 spaces
    Error when assigning SID: Action VAL_SID_CONVERT, InfoObject ZMNS_DATE
    Value '20101502' of characteristic 0DATE is not plausible
    Error when assigning SID: Action VAL_SID_CONVERT, InfoObject 0CRM_EXCDAT
    Value '31122009' of characteristic 0DATE is not plausible
    Error when assigning SID: Action VAL_SID_CONVERT, InfoObject 0CRM_PRIDAT
    Value '31122009' of characteristic 0DATE is not plausible
    Error when assigning SID: Action VAL_SID_CONVERT, InfoObject ZCOMPDAT
    Value '31122009' of characteristic 0DATE is not plausible
    Thanks
    Baskar

  • Analytic View join issue between TIMESTAMP and DATE formats

    I have a fact table in my data foundation that has a TIMESTAMP date that i am trying to join with to my calendar table that has  a DATE format .  I am unable to query this view after creating it and it appears to be because of the data type differences.  Is there a way to convert when joining? i can not seem to find a way to do this

    Yes, you can use a generated always statement to create a join predicate and join against that in the view.
    Or you can join against the M_TIME_DIMENSION table in an attribute view to convert.
    Or you can create a calculated column and do a union.
    Depending on the requirements, one of these will be the best fit.

  • FM For date Format

    Hi,
    Could anybody assist me, the date format is like 20080519, but it should be in the format of 19.05.2008.Is there any function module .
    Thanks in advance.
    Regards.
    I.Reddy Prasad.

    Hi,
    CALL FUNCTION 'CONVERT_DATE_TO_INTERN_FORMAT'
        EXPORTING
          DATUM = W_DATE1
          DTYPE = 'DATS'
        IMPORTING
          IDATE = W_DATE2.
    Month in words
    Date Format (month in words, day and year in number)
    Regards
    Adil

  • Function module for date format

    Hi,
    what is the function module name to get the date format in <b>(dd.mm.yyyy)</b> from (<b>dd-mon-yyyy)</b>
    Thanx.

    try this Fm
    CONVERSION_EXIT_SDATE_INPUT
    input as dd-mon-yyyy
                28FEB2007
    im assuming mon in literal format.
    output is 20070228
    WRITE STATEMENT WILL DISPLAY THE DATA IN DEFALUT DATE FORMATS OF SU3 .
    <b>Elaborate teh query with an example .</b>
    check this
    regards,
    vijay.

  • How to declare data type for DATE format

    Hi,
    I need the data format in this format  DD-MM-YYYY HH:MI:SS
    So, I m using    select TO_CHAR(Date_Column, 'DD-MM-YYYY HH:MI:SS')  from dual;
    Now, In my procedure I need to assign this to a OUT  variable, what should be the Data type of out variable.
    My OUT variable is used by other program.
    Thanks

    You can use VARCHAR2. Try the below
    CREATE OR REPLACE PROCEDURE proc_test(p_indate DATE, p_outdate OUT VARCHAR2) 
    AS 
    BEGIN 
       p_outdate:= TO_CHAR(p_indate,'DD-MON-YYYY HH:MI:SS'); 
    END; 
    SET SERVEROUTPUT ON
    DECLARE 
       v_date  VARCHAR2(50); 
    BEGIN 
       proc_test(SYSDATE,v_date);
       DBMS_OUTPUT.PUT_LINE(v_date);  
    END; 
    OUTPUT:-
    anonymous block completed
    15-JAN-2014 12:13:46

  • Transformations for Date Format

    I have a flat file which contains a field for date as 02-10 for MMYY, how can I change it to 0210, can I use formula builder?

    Hi,
    Copy and Past teh below program, and implement the same logic for your requirements.
    REPORT  ZBITEST.
    Data: zdd type sy-datum,
          zmm(2) type n,
          zyy(4) type n,
          zd(2) type n,
          zdm(6) type n.
          zdd = sy-datum.
          zd = zdd+6(2).
          zmm = zdd+4(2).
          concatenate zd zmm into zdm.
          write:/ zdd.
          write:/ zd.
          write:/ zmm.
          write:/ zdm.
    Thanks
    Reddy

Maybe you are looking for

  • Cannot select Contact/Group from Recent Contacts L...

    A group contact in my Recent Contacts list cannot be selected. A few days ago, a group call was held and I missed the initial requests. The 3rd request I accepted. However, the contact list entry still lists it as 2 "new" events, and attempting to cl

  • ACS 4.2.1.15 External User Database 'Authen DLL '

    Having CSACSE-1113-K9 with ACS 4.2.15. I want to confiure windows user database under extrenal user database but i get an error  (attached) 'An error has occured while processing the Authen DLL Configure pagebecasue an error occured....' External Use

  • The tabs in the phone app are responding too late

    After installing IOS 8.0.2 update on my iphone 5, all of the tabs in the phone app (including scrolling the contacts or dialing numbers) are responding too late. All other apps are working as fast as they work before the update.

  • I have downloaded the latest version of Lightroom but I so not see the option Photo Photo Merge in order to use the new HDR

    Cannot figure out what is wrong. It says my lightroom is up to date but not showing the option photo>photo merge so I can use the new HDR function in Lightroom. Is anyone else having this problem?

  • EJB or PHP

    Hi all I am helping to implement and build a student managment system for the education institution I work for which must be accessibel over the net .And I am having a hard time trying to convince senior mangement to switch from PHP to using the JAVA