AMX:inputDate input as dd-MMM-AA format

Hello

I use JDev 12.1.3 with MAF 2.1.3 I need to define a format amx:inputDate, I know its capture by the LOCAL format by default, but I need to put it because I need to collect the date and do a deed in the java class back-end, is anyway to set the format for the amx input format : inputDate as dd-MMM-yy?

Thank you

Hello.

What you're trying to achieve exactly? The scope of the documentation for date. MinValue :

Value ISO-8601 for date, datetime or time. This value may be presented to the user by using the local time zone specified on their device, but the value of support will be always ISO-8601.

This means that the value that get you from the component always includes the date, time and time zone information schedule. If you need to manipulate, I suggest you have a look on the DateTimeFormatter class.

https://docs.Oracle.com/javase/8/docs/API/Java/time/format/DateTimeFormatter.html

Using the parse in this class method, it is trivial to get an instance of the string returned by the date java.time.ZonedDateTime. MinValue, for example.

Best regards

Frédéric Desbiens

Senior Product Manager

Mobility and Cloud oracle

Twitter: @BlueberryCoder

blog: http://blogs.oracle.com/blueberry

Tags: Oracle Mobile

Similar Questions

  • Microsoft fix - it message 'string input not in the right format. '

    Microsoft fix - it message 'string input not in the right format", I have uninstalled & reinstalled. always the same problem on all fix - its

    Hello

    The following forum would be more suited for this question.

    Microsoft Fix it Center - NOT for general support questions
    http://social.Microsoft.com/forums/en-us/fixitcenter/threads

  • When I try to open e-mail files a small box opens with the setting or the input string was not good format

    original title: windows live suit

    When I try to open e-mail files a small box opens with the setting or the input string was not good format

    Windows Live Solution Center
    http://windowslivehelp.com/

  • How can I change the value of 'dd MMM yyyy' format in a datepicker from the Toolbox in Visual Basic

    I want to replace the regional format date and time. Please help. I have change the format 0 - dtpLongDate, but the problem persists.

    Hi Jay,.

    The question you posted would be better suited in the MSDN Forums. I would recommend posting your query in the MSDN Forums.

    MSDN Forum (Visual Basic)

    http://social.msdn.Microsoft.com/forums/vstudio/en-us/home

    Hope this information helps.

  • Date.MinValue to format date and time in the MAF

    Hello

    For the amx:inputdate component, I want to display the date and time format. I need to be able to select the date and time.

    Can someone help me please in obtaining it. If items available, please share me.

    Thank you

    Rita

    If you just want to show the date or time, or both, then you change the attribute 'type' to date. MinValue

    To date. MinValue on iOS, a native component selector is used for this purpose. On Android, there is a date component. MinValue AMX used.

    You can check the link below for how it will look like

    https://wikis.Oracle.com/display/ADFMobileDesign/component+-+input+date

  • Conversion of RichInputDate into specific format

    Hi all
    Greetings!

    I use jdev 11.1.2.1.0
    I have two components the date on my JSPX.
    <af:inputDate label="From Date" id="fromDate" binding="#{DepositeLog.dtFrom}" autoSubmit="true" immediate="true">
            <af:convertDateTime pattern="#{resourceBundle['Common.shortDisplayDatePattern']}"/>
    </af:inputDate>
    <!--  shortDisplayDatePattern is dd-MMM-yyyy : from Resource Bundle -->
    <af:inputDate label="To Date" id="toDate" binding="#{DepositeLog.dtTo}"  autoSubmit="true" immediate="true">
            <af:convertDateTime pattern="#{resourceBundle['Common.shortDisplayDatePattern']}"/>
    </af:inputDate>
    In managed bean I get those dates in the form,
            System.out.println(this.getDtFrom().getValue());
            System.out.println(this.getDtTo().getValue()); 
       //Output of these 2 SOP's is,        
            Fri May 09 10:18:03 IST 2008
            Tue May 01 10:18:03 IST 2012
          
    Now, I want to convert these dates in the format: May 9, 2008 and may 1, 2012, i.e. in the dd MMM yyyy format
    These new dates must be String data type.

    I don't want to manually search for the required strings using split()

    I tried to do this,
            this.getDtFrom().getMinValue();
            //which actually returns java.util.Date(), but in my case it returned null.
    In addition,
    I tried this,
            SimpleDateFormat sdf = new SimpleDateFormat("dd-mmm-yyyy");//line 1
            String toDate = this.getDtFrom().getValue().toString();//line 2
            System.out.println(sdf.format(toDate));//line 3
       //But it thrown exception: 
            "java.lang.IllegalArgumentException: Cannot format given Object as a Date" for line #3
    Appreciate your help...

    Thank you and best regards,
    Madhav K.

    Published by: Madhav on May 16, 2012 22:28
    import oracle.adf.view.rich.component.rich.input.RichInputDate;
    
    public class Test
    {
      private RichInputDate fromDate;
    
      public Test()
      {
      }
    
      public void setFromDate(RichInputDate fromDate)
      {
        this.fromDate = fromDate;
      }
    
      public RichInputDate getFromDate()
      {
        return fromDate;
      }
    
      public String readDate()
      {
        // Add event code here...
         java.util.Date fromDate = (java.util.Date) this.getFromDate().getValue();
         System.out.println(fromDate);
         System.out.println(formatUtilDateAsSimpleDate(fromDate));
        return null;
      }
    
      public  String formatUtilDateAsSimpleDate(java.util.Date date)
      {
        java.text.SimpleDateFormat sdf =
          new java.text.SimpleDateFormat("dd-MMM-yyyy");
        return sdf.format(date);
      }
    }
    

    The result is

    Tue May 01 00:00:00 GMT 2012
    01-May-2012
    

    Published by: Mohammad Jabr on May 17, 2012 08:30

  • Error: 'capture string not in correct format' when tried to run Microsoft Fix it

    Original title: micro solve this Center meets all attempts to click for repair by 'string input not in the correct format' to try to correct the printer does not print not while going through all the correct motions.

    Please see above under

    Hi llc333,

    1. what web browser are you help you to download Microsoft remedy?
    2 you get an error message when tried to print?

    Try these steps and check the result.
    a. Click Start and then click Printers and faxes.
    b. in the menu help, click on Help and Support Center.
    c. in Help and Support Center, click fixing a printing problem.
    d. in the right pane, click Printing Troubleshooter.

    Check if the following articles help you to fix the printing problem.
    1 see resources for the resolution of the printer in Windows XP problems
    2 see Advanced Troubleshooting for when you cannot print in Windows XP

    Visit our Microsoft answers feedback Forum and let us know what you think.

  • How to validate the format of the SSN

    How can I validate the input SSN is in the format XXXX-XXXX-XXXX or not

    You must write a custom method to validate the format.

    It depends on where you want to validate. If that's all by accepting an entry from the page, you can use regular Expressions, or you can use the string splitting and validate according to what you need.

    If it's during recovery of the database, you can do it even in the application it self.

    You can write the logic and let us know if you get stuck or gettting error.

    See you soon

    AJ

  • Oracle of the MAF: How get text of a page from the amx and show them in another page of amx

    I created a simple form using amx as below:

    <? XML version = "1.0" encoding = "UTF-8"? >

    " < amx:view xmlns: xsi =" http://www.w3.org/2001/XMLSchema-instance "

    ' xmlns:amx = ' http://xmlns.Oracle.com/ADF/MF/AMX "xmlns:dvtm =" http://xmlns.Oracle.com/ADF/MF/AMX/DVT ">

    < amx:panelPage id = "pp1" >

    < amx:facet name = "header" >

    < amx:outputText value = "Header" id = "ot1" / >

    < / amx:facet >

    < amx:facet = "primary" name >

    < amx:commandButton id = "cb1" / >

    < / amx:facet >

    < amx:facet = "secondary" name >

    < amx:commandButton id = "cb2" / >

    < / amx:facet >

    < amx:panelFormLayout id = "p1" >

    < amx:inputDate id = "i1" label = "Date" / >

    < amx:selectBooleanCheckbox id = "s1" label = "CheckBox" / >

    < amx:selectBooleanSwitch id = "s2" label = "Switch" / >

    < amx:selectOneRadio id = "s3" label = "Radio button" >

    < amx:selectItem id = "s4" / >

    < / amx:selectOneRadio >

    < amx:inputText id = "i2" hintText = 'enter something '.

    Label = "Edit Text" > < / amx:inputText >

    < amx:inputText id = "text1" label = "" enter password: ""

    secret = "true" / >

    < / amx:panelFormLayout >

    < amx:commandButton id = "c1" text = "Send" action = "getFormDetails" > < / amx:commandButton >

    < / amx:panelPage >

    < / amx:view >

    I want to extract the text entries, check box, option button, and display them in another page of amx. Please help me.

    Hello

    Here is an example.

    Assuming that there is a taskflow (as feature) which uses two activities with the name View1 and view2, with a case of View1 to View2 control flow is getFormDetails.

    code View1.AMX:

    "http://www.w3.org/2001/XMLSchema-instance" xmlns:amx ="http://xmlns.oracle.com/adf/mf/amx"

    xmlns:dvtm ="http://xmlns.oracle.com/adf/mf/amx/dvt" >. "

    value="#{pageFlowScope.TestBean.userNameValue}"/ >

    code View2.AMX:

    "http://www.w3.org/2001/XMLSchema-instance" xmlns:amx ="http://xmlns.oracle.com/adf/mf/amx"

    xmlns:dvtm ="http://xmlns.oracle.com/adf/mf/amx/dvt" >. "

    TestBean.java (which is located in pageFlowScope).

    mobile plan;

    public class TestBean {}

    private String _userNameValue;

    Private boolean _checkboxValue;

    public TestBean() {}

    }

    {} public void setUserNameValue (String _userNameValue)

    This ._userNameValue = _userNameValue;

    }

    public String getUserNameValue() {}

    Return _userNameValue;

    }

    {} public void setCheckboxValue (boolean _checkboxValue)

    This ._checkboxValue = _checkboxValue;

    }

    public boolean isCheckboxValue() {}

    Return _checkboxValue;

    }

    }

    Arun-

  • Format 'DD-MON-YY' (string) 'conversion of format YYYY-MM-DD' (date).

    Hi all

    We have an entry in the format of string like "24 August 14" to come and we insert into DB, which expects in the date format in the form 'YYYY-MM-DD".

    Please suggest how to convert this to xslt or any other means of better.

    TIA,

    Bob

    I solved the problem below workaround:

    I was going to input of reading file (string format) and written in DB (date format)

    so just modify the xsd generated to use date instead of the string, which is passed:

    TO

  • I input video file in the pdf, but do not play video file to ipad and iphone. Please tell me about this?

    I input video file in pdf format, and I can see play video at the office, but plays not not video files to ipad and iphone. Please tell me about this?

    iPad is not supported for the video file to PDF?

    Acrobat Reader for iOS does not support this.

  • using an input file

    For most of the scripts I created, I did:

    $vmlist = "blah", "blah1", "blah2" <-hold the file located in c:\tmp\inputfile


    foreach ($vm to $vmlist)
    {
    Get - VM $vm | Select-Object - Property Name, NumCpu | FT - AutoSize

    I really want to use an input file instead of list that I am above. I've tinkered with it but im just don't get it.

    Thank you!!!

    Hello, drivera01-

    You can use something like Get-Content or Import-Csv to take input from a file.  Since you are just a list of names, you could make an input file that has a name of virtual machine per line, use Get-Content and then iterate over the list of names of virtual machine, such as:

    ## get the list of VM names from a text file$vmList = Get-Content C:\temp\inputFile.txtforeach ($vmName in $vmList) {Get-VM $vmName | Select-Object -Property Name,NumCpu | FT -AutoSize}
    

    Or, in this case, since Get - VM accepts an array of one or more names of virtual machine, you can just pass the list "imported" to hold the names of virtual machine once you did call Get-Content, like:

    ...## no need to use a foreach loop in this instanceGet-VM $vmList | ft -AutoSize Name,NumCPU
    

    (also cleaned the part select/ft a little).  Other ways to use an input file will result in Import-Csv if you have a bit more involved data or Import-Clixml if your input data is in XML format.

    How do I?

  • varchar2 to the date format conversion

    I have converted the formats of date several times, but for some reason, I get an error invalid number when you try to convert a varchar2 column. I tried the to_char and to_date function and I get the same result. The column is a date and it is formatted like ME-DD-YYYY, but I want to change it to DD/MM/YYYY. My query is below:

    Select to_date('fccpdate','MM/DD/YYYY')
    of cc_class_scmast_v

    When I try to_date I get this:

    Error from the 1 in the command line:
    Select TO_DATE ('fccpdate ',' MON-DD-YYYY "") of cc_class_scmast_v, where fccpdate IS NOT NULL
    Error report:
    SQL error: ORA-01858: a non-digit character was found here where was waiting for a digital
    01858 00000 - "a non-digit character found here where was waiting for a digital".
    * Cause: Input data to convert using a date format model has been
    incorrect answer. The input data did not contain a number where is a number
    required by the format model.
    * Action: Fix the input data or the date format model to ensure that the
    elements correspond to the number and the type. And then try the operation again.



    When I try to_char I get this:

    Error from the 1 in the command line:
    Select TO_char ('fccpdate ',' MON-DD-YYYY "") of cc_class_scmast_v, where fccpdate IS NOT NULL
    Error report:
    SQL error: ORA-01722: invalid number
    01722 00000 - "invalid number."
    * Cause:
    * Action:


    I tried to remove the single quotes of my column and that does make a difference. Any help is appreciated.

    Hello

    housetiger77 wrote:
    I have converted the formats of date several times, but for some reason, I get an error invalid number when you try to convert a varchar2 column. I tried the to_char and to_date function and I get the same result. The column is a date and it is formatted like ME-DD-YYYY,

    If the column is a DATE, then it has the same format that all DATEs, which is nothing like 'DD-MON-YYYY '. Formats like which apply only to chains.
    Conversely, if it is in the format "DD-MON-YYY", then it is a string, not a DATE.

    but I want to change to DD/MM/YYYY. My query is below:

    Select to_date('fccpdate','MM/DD/YYYY')
    of cc_class_scmast_v

    To_date (x, "MM/DD/YYYY") tries to convert the string x in a DATE. Let's say it starts by taking the first 2 characters of x, for the month. The first 2 characters of 'fccpdate' are "fc", which is not a valid number (at least not in base 10), not to mention a number from 1 to 12, TO_DATE so will raise an error.

    When I try to_date I get this:

    Error from the 1 in the command line:
    Select TO_DATE ('fccpdate ',' MON-DD-YYYY "") of cc_class_scmast_v, where fccpdate IS NOT NULL
    Error report:
    SQL error: ORA-01858: a non-digit character was found here where was waiting for a digital
    01858 00000 - "a non-digit character found here where was waiting for a digital".
    * Cause: Input data to convert using a date format model has been
    incorrect answer. The input data did not contain a number where is a number
    required by the format model.
    * Action: Fix the input data or the date format model to ensure that the
    elements correspond to the number and the type. And then try the operation again.

    When I try to_char I get this:

    Error from the 1 in the command line:
    Select TO_char ('fccpdate ',' MON-DD-YYYY "") of cc_class_scmast_v, where fccpdate IS NOT NULL
    Error report:
    SQL error: ORA-01722: invalid number
    01722 00000 - "invalid number."
    * Cause:
    * Action:

    I tried to remove the single quotes of my column and that does make a difference. Any help is appreciated.

    It's a good first step. Literals are enclosed in single quotes are not identifiers (including the column names). "fccpdate" is the literal string of 8 characters containing 'f', ' c; Another 'c', 'p' 'd', 'a', 't' and 'e'. " fccpdate (without the single quotes) can be the name of a column.

    If fccpdate is a string, as July 18, 2012', then you can convert it to a DATE using TO_DATE.

    TO_DATE (fccpdate, 'DD-MON-YYYY')
    

    If you want to display a DATE in a particular format, use

    TO_CHAR ( d
            , f
            )
    

    where d is a DATE, and f is the format string. In this case, d is perhaps the TO_DATE expression above

    TO_CHAR ( TO_DATE (fccpdate, 'DD-MON-YYYY')
            , 'MM/DD/YYYY'
            )
    

    I hope that answers your question.
    If not, post a small example data (CREATE TABLE and only relevant columns, INSERT statements) for all of the tables involved and also publish outcomes from these data.
    Explain, using specific examples, how you get these results from these data.
    Always tell what version of Oracle you are using.
    See the FAQ forum {message identifier: = 9360002}

  • SYSDATE - how to convert a certain format

    Hello

    I am trying to use sysdate as default setting in one of my reports and receive an error message (ORA-01843: not one month valid)...

    My sysdate is coming in the following (DD-MMM-YY) format and gives an error message... but when I tried the date manually in the following (JJ/MM/AAAA) this format worked...

    can I know how to convert the following format DD/MM/YYYY to sysdate

    Thanks in advance

    Maybe he means LUN-JJ-AA? And Yes, using 2 years of numbers is an accident waiting to happen...

    Thank you

    Tony Miller
    Webster, TX

    Follow your passion; the rest will take care of itself.

    JMS

    If you answer this question, please mark the thread as closed and give points where won...

  • A form of parameter format

    Good morning gurus, Experts and everyone,

    We would like to change the input in MM/DD/YY format.

    You can see our current package to the following ADDRESS:
    http://3.BP.blogspot.com/_KYY-OV98iIo/TCnw5J8TEaI/AAAAAAAAAHo/9DnTJTs8now/S1600/here03.bmp

    You can view the current version:
    http://Vimeo.com/12944802


    If you get a chance, please share your experience.

    Thanks in advance,


    NY

    Navigate to the property of the parameter it you can set the format of the date of entry.

Maybe you are looking for