What is a formatted string?

does anyone know what a "formatted string" is?
Thanks.

That could perhaps refer to the Format classes in java.text. For example if you have a Date object that you want to format in a certain with given a pattern, you can use the SimpleDateFormat. Those classes can also be used to parse strings. DecimalFormat is used to format numbers, and MessageFormat can format a string providing up to 10 values that can be a mix of e.g. Number, Date and String objects.
More general a formatted string is just a string that has been formatted in a specific way given some values.

Similar Messages

  • What's the format of the datasource tag in jbosscmp-jdbc.xml

    Hi,
    I made a CMP when I use Lomboz to generate the classes, and xml files, but I still don't know how to relate my CMP to datasource.
    I thought may be I should configure the jbosscmp-jdbc.xml, because when I look in this file and found:
    <defaults>
    <datasource>PLEASE_MODIFY_THIS</datasource>
    <datasource-mapping>PLEASE_MODIFY_THIS</datasource-mapping>
    <preferred-relation-mapping>PLEASE_MODIFY_THIS</preferred-relation-mapping>
    </defaults>
    But I don't know how to "modify this", What do those tags mean? what are those for? and what are the Formats?
    My database -- mySQL
    datasouce xml file -- test-ds.xml:
    <datasources>
    <local-tx-datasource>
    <jndi-name>jdbc/test</jndi-name>
    <connection-url>jdbc:mysql://devsz-ma3.cn1.belton.com.hk:3306/test?useUnicode=true&characterEncoding=UTF-8</connection-url>
    <driver-class>com.mysql.jdbc.Driver</driver-class>
    <user-name>touchpanel</user-name>
    <password>touchpanel</password>
    </local-tx-datasource>
    </datasources>
    I need help, can you tell me some about that, thanks
    next is my CMP entity bean:
    package ejb.product;
    import java.rmi.RemoteException;
    import javax.ejb.EJBException;
    import javax.ejb.EntityBean;
    import javax.ejb.EntityContext;
    import javax.ejb.RemoveException;
    * @ejb.bean name="Product"
    *     jndi-name="ProductBean"
    *     type="CMP"
    *  primkey-field="productId"
    *  schema="Product"
    *  cmp-version="2.x"
    * This is needed for JOnAS.
    * If you are not using JOnAS you can safely remove the tags below.
    * @jonas.bean ejb-name="Product"
    *     jndi-name="ProductBean"
    * @jonas.jdbc-mapping  jndi-name="jdbc/test" jdbc-table-name="FL_PRODUCT"
    *  @ejb.persistence
    *   table-name="FL_PRODUCT"
    * @ejb.finder
    *    query="SELECT OBJECT(a) FROM Product as a" 
    *    signature="java.util.Collection findAll()" 
    * @ejb.finder
    *       query="SELECT OBJECT(a) FROM Product a where a.NAME = ?1" 
    *       signature="java.util.Collection findByName(java.lang.String name)" 
    * @ejb.finder
    *       query="SELECT OBJECT(a) FROM Product a where a.DESCRIPTION = ?1" 
    *       signature="java.util.Collection findByDescription(java.lang.String desc)" 
    * @ejb.finder
    *       query="SELECT OBJECT(a) FROM Product a where a.BASE_PRICE = ?1" 
    *       signature="java.util.Collection findByBasePrice(double basePrice)" 
    * @ejb.finder
    *       query="SELECT OBJECT(a) FROM Product " 
    *       signature="java.util.Collection findAllProducts()" 
    * @ejb.finder
    *       query="SELECT OBJECT(a) FROM Product a where a.BASE_PRICE > ?1" 
    *       signature="java.util.Collection findExpensiveProduct(double maxPrice)" 
    * * @ejb.finder
    *       query="SELECT OBJECT(a) FROM Product a where a.BASE_PRICE < ?1" 
    *       signature="java.util.Collection findCheapProduct(double minPrice)" 
    * This is needed for JOnAS.
    * If you are not using JOnAS you can safely remove the tags below.
    * @jonas.finder-method-jdbc-mapping  method-name="findAll"
    *     jdbc-where-clause=""
    * @jonas.jdbc-mapping  jndi-name="jdbc/test"
    *     jdbc-table-name="FL_PRODUCT"
    public abstract class ProductBean implements EntityBean {
         protected EntityContext ectx;
          * The  ejbCreate method.
          * @ejb.create-method
         public java.lang.String ejbCreate(String productId, String name, String desc,double basePrice) throws javax.ejb.CreateException {
              // EJB 2.0 spec says return null for CMP ejbCreate methods.
              // TODO: YOU MUST INITIALIZE THE FIELDS FOR THE BEAN HERE.
              // setMyField("Something");
              System.out.println("Entering ProductBean.ejbCreate()");
              setProductId(productId);
              setName(name);
              setDescription( desc);
              setBasePrice(basePrice);
              System.out.println("Leaving ProductBean.ejbCreate()");
              return productId;
          * The container invokes this method immediately after it calls ejbCreate.
         public void ejbPostCreate(String productId, String name, String desc,double basePrice) throws javax.ejb.CreateException {
         * Returns the productId
         * @return the productId
         * @ejb.persistent-field
         * @ejb.persistence
         *    column-name="PRODUCT_ID"
         *     sql-type="varchar"
         * @ejb.pk-field
         * @ejb.interface-method
         * This is needed for JOnAS.
         * If you are not using JOnAS you can safely remove the tags below.
         * @jonas.cmp-field-jdbc-mapping  field-name="productId"
         *     jdbc-field-name="PRODUCT_ID"
         public abstract java.lang.String getProductId();
         * Sets the productId
         * @param java.lang.String the new productId value
         * @ejb.interface-method
         public abstract void setProductId(java.lang.String productId);
         * Returns the name
         * @return the name
         * @ejb.persistent-field
         * @ejb.persistence
         *    column-name="NAME"
         *     sql-type="varchar"
         * @ejb.interface-method
         * This is needed for JOnAS.
         * If you are not using JOnAS you can safely remove the tags below.
         * @jonas.cmp-field-jdbc-mapping  field-name="name"
         *     jdbc-field-name="NAME"
         public abstract java.lang.String getName();
         * Sets the name
         * @param java.lang.String the new name value
         * @ejb.interface-method
         public abstract void setName(java.lang.String name);
         * Returns the description
         * @return the description
         * @ejb.persistent-field
         * @ejb.persistence
         *    column-name="DESCRIPTION"
         *     sql-type="varchar"
         * @ejb.interface-method
         * This is needed for JOnAS.
         * If you are not using JOnAS you can safely remove the tags below.
         * @jonas.cmp-field-jdbc-mapping  field-name="description"
         *     jdbc-field-name="DESCRIPTION"
         public abstract java.lang.String getDescription();
         * Sets the description
         * @param java.lang.String the new description value
         * @ejb.interface-method
         public abstract void setDescription(java.lang.String description);
         * Returns the basePrice
         * @return the basePrice
         * @ejb.persistent-field
         * @ejb.persistence
         *    column-name="BASE_PRICE"
         *     sql-type="double"
         * @ejb.interface-method
         * This is needed for JOnAS.
         * If you are not using JOnAS you can safely remove the tags below.
         * @jonas.cmp-field-jdbc-mapping  field-name="basePrice"
         *     jdbc-field-name="BASE_PRICE"
         public abstract double getBasePrice();
         * Sets the basePrice
         * @param double the new basePrice value
         * @ejb.interface-method
         public abstract void setBasePrice(double basePrice);
         /* (non-Javadoc)
          * @see javax.ejb.EntityBean#ejbActivate()
         public void ejbActivate() throws EJBException, RemoteException {
              System.out.println("ejbActivate() called.");
         /* (non-Javadoc)
          * @see javax.ejb.EntityBean#ejbLoad()
         public void ejbLoad() throws EJBException, RemoteException {
              System.out.println("ejbLoad() called.");
         /* (non-Javadoc)
          * @see javax.ejb.EntityBean#ejbPassivate()
         public void ejbPassivate() throws EJBException, RemoteException {
              System.out.println("ejbPassivate() called.");
         /* (non-Javadoc)
          * @see javax.ejb.EntityBean#ejbRemove()
         public void ejbRemove() throws RemoveException, EJBException, RemoteException {
              System.out.println("ejbRemove() called.");
         /* (non-Javadoc)
          * @see javax.ejb.EntityBean#ejbStore()
         public void ejbStore() throws EJBException, RemoteException {
              System.out.println("ejbStore() called.");
         /* (non-Javadoc)
          * @see javax.ejb.EntityBean#setEntityContext(javax.ejb.EntityContext)
         public void setEntityContext(EntityContext arg0) throws EJBException, RemoteException {
              this.ectx = arg0;
         /* (non-Javadoc)
          * @see javax.ejb.EntityBean#unsetEntityContext()
         public void unsetEntityContext() throws EJBException, RemoteException {
              this.ectx = null;
    }

    you can try this
    <defaults>
    <datasource>java:/jdbc/test</datasource>
    <datasource-mapping>MySQL</datasource-mapping>
    <create-table>false</create-table>
    <remove-table>false</remove-table>
    </defaults>
    JaimeS

  • Parsing formatted String to Int

    How can I parse formatted string to Integer ?
    I have a formated string like this $900,000 and I need to convert it to 900000 so I could do calculations with it.
    I tried something like this
    NumberFormat nf = NumberFormat.getIntegerInstance(request.getLocale());
    ttlMargin=nf.parse(screenVal);I got this exception
    "java.lang.NumberFormatException: For input string: "$1,050,000""

    I am working on the JSP file that provides
    margins,sales etc. I am reading this data off the
    screen where it is beeing displayed according to the
    accounting practices.
    That's why I get it as a formatted string and why I
    am trying covert that string to the numberScreen-scraping is a problematic, bad design. It sounds like what you really want is to call a web service which returns its results as data that a program can understand (XML, for example), not HTML (which is meant more for humans to read). I know, you probably can't change the design at this point... just food for thought. In the meantime, you'll probably have to manually parse those strings yourself by stripping out the '$' and ',' characters and then use parseInt on the result.

  • How to get the system date format string?

    Hello, everybody!
    I want to create a MaskFormatter with a mask for dates. So, I could suply as the constructor parameter: "##/##/####'. However, what if the year comes first in the current system date format settings, or the month is in the second place or in the first?... So, I can't just suppose that the current locale format for dates is like the one above. So, my question is: is there a way to get the SYSTEM DATE FORMAT STRING in Java? Searching in google I saw that this was already asked in this forum:
    http://forum.java.sun.com/thread.jspa?threadID=301034&messageID=1193794
    but there was no effective answer. Does someone already know how to get this?
    Thank you.
    Marcos

    Hi, not sure, but
    import java.text.*;
    SimpleDateFormat sdf = new SimpleDateFormat();
    System.out.println(sdf.toPattern());
    will output something like dd/MM/yy HH:mm
    hthThank you very much. It worked.

  • Error: ORA-01861: literal does not match format string

    Hi,
    I am doing a RFC-XI-JDBC scenario.
    In the CC monitoring , i am getting this error for the reciver CC:
    "Error while parsing or executing XML-SQL document: Error processing request in sax parser: Error when executing statement for table/stored proc. "TableNAMe"(structure 'STATEMENTNAME'): java.sql.SQLException: ORA-01861: literal does not match format string "
    Please guide me what can be the cause and how to solve it.
    Thanks,
    Puneet

    This is how my payload looks like :
    <?xml version="1.0" encoding="UTF-8"?>
    <ns1:MT_JDBC_REC xmlns:ns1="https:namespace.scene3">
    <STATEMENTNAME>
    <TABLE_NAME action="INSERT">
    <TABLE>ggclgis</TABLE>
    <access>
    <VALVE_ID>12584</VALVE_ID>
    <EQUNR>122</EQUNR>
    <ERNAM>12122</ERNAM>
    <INVNR>1212</INVNR>
    <GROES>1212</GROES>
    <ELIEF>123</ELIEF>
    <GWLEN>21-jul-2008</GWLEN>
    <GWLDT>12-jun-2006</GWLDT>
    <SERGE>wqwqw</SERGE>
    <TYPBZ>wqwqwq</TYPBZ>
    </access>
    </TABLE_NAME>
    </STATEMENTNAME>
    </ns1:MT_JDBC_REC>
    Please tell me if it looks fine.

  • Parse XML formatted String

    Hi All,
       I have a string field that is formatted in XML format. What I want to be able to do is pull a specific element from the xml formatted string.
    Example string:
    <customer><name>john</name><id>25636</id></customer>
    I want to retreive just the id number of 25636 from this string.
    I would I go about accomplishing this?
    Thank you in advance,

    I fixed it on my own.
    Here' s my answer for others that may need it:
    if(instr({field.xmlstring},'</id>')  - instr({field.xmlstring},'<id>') = 7)then
       mid(totext({field.xmlstring}),instr({field.xmlstring},'<id>')+4,3)
    else if(instr({field.xmlstring},'</id>')  - instr({field.xmlstring},'<id>') = 8)then
       mid(totext({field.xmlstring}),instr({field.xmlstring},'<id>')+4,4)
    else if(instr({field.xmlstring},'</id>')  - instr({field.xmlstring},'<id>') = 9)then
       mid(totext({field.xmlstring}),instr({field.xmlstring},'<id>')+4,5)
    I use the conditions to cover all possible lengths of the id number.

  • Format String using XML attributes

    I need to format a string based on attributes from a schema. I am attempting to do this using an Assign activity and the java embedded format string function. Here is a simplified version of what I am trying to do:
    oraext:format-string('Service Error COD={0}', bpws:getVariableData('caXMLError','/CAXMLERROR/CLIERR/@COD'))
    When I execute this line I get:
    XPath expression failed to execute. An error occurs while processing the XPath expression; the expression is oraext:format-string('Service Error COD={0} ',bpws:getVariableData('caXMLError','/CAXMLERROR/CLIERR/@COD')). The XPath expression failed to execute;
    The value at bpws:getVariableData('caXMLError','/CAXMLERROR/CLIERR/@COD' is valid because I can create a dummy xsd:string variable and set it equal to that.
    I also tried to wrap the getVariableData with the get_content_as_string methods and neither worked. I also verified that my format-string function is working because when I substitute just a plain string like ‘T01’ the string is successfully created.
    Any ideas what I am doing wrong or how I can accomplish this?

    If the xml document is to be stored in the Oracle database with the XML SQL Utility, defne elements instead of attributes. XSU utility does not map the attributes of an xml document to the database table.
    Further ref:
    http://xml.coverpages.org/elementsAndAttrs.html

  • Format string in Essbase 11.1.1

    Hello Experts,
    I tried the following from the examples:
    MdxFormat(
    CASE
    WHEN CellValue() <= 5 THEN “Low”
    WHEN CellValue() <= 10 THEN “Medium”
    WHEN CellValue() <= 15 THEN “High”
    ELSE “Very High”
    END
    no success
    CASE
    WHEN CellValue() <= 5 THEN “Low”
    WHEN CellValue() <= 10 THEN “Medium”
    WHEN CellValue() <= 15 THEN “High”
    ELSE “Very High”
    END
    no success
    CellValue()
    no success
    What is a valid format string?
    I would appreciate if you could explain me format string and valid example.
    Environment :
    Essbase 11.1.1
    OS : Win Server 2003
    Thanks in advance.
    Regards,
    Sonu

    Refer the Essbase 11.1.1 Administration Guide document, Chapter 12 "Working with Typed Measures" , under section "Working with Format Strings" in Page 195
    A format string is defined by the following syntax:
    format_string_expression = MdxFormat ( string_value_expression )
    where string_value_expression is a valid MDX string value expression as described in the MDX specification documented in theOracle Essbase Technical Reference.
    How to Download Essbase 11.1.1 Database Administrator's Guide and Technical Reference Document.
    a) Login into Metalink.
    b) Select the option "Knowledge" from the Menu. Under the section "Hyperion Online Product Documentation", Click on the link "Hyperion 11.1.1 Documentation"
    c) In the Documentation Library window, Select the tab "Essbase" (http://download.oracle.com/docs/cd/E12825_01/nav/portal_3.htm) and under Oracle Essbase, download the "Database Administrator's Guide" and "Technical Reference" Documents.
    Example 1:
    MdxFormat
    ( CASE
    WHEN CellValue() <= 5 THEN
    "Low"
    WHEN CellValue() <= 10 THEN
    "Medium"
    WHEN CellValue() <= 15 THEN
    "High"
    ELSE
    "Very High"
    END
    Example 2:
    MdxFormat(numtostr(cellvalue())) // need to use mdxformat and numtostr to input a string argument.

  • Premiere sends EDL with 'invalid timecode format string'

    Following the suggestions in this thread, I am attempting to send an EDL of a Premiere sequence to Speedgrade.
    When I attempt to import the EDL into Speedgrade I get this error message:
    ERROR
    In point timecode is invalid. Invalid timecode format string(hours): '23813+20'
    in edit 1
    File: 001 LR001 V C 2813+20 23815+17 0:00 1+37
    Line: 2
    I've worked very rarely with EDLs but have read the Speedgrade and Premiere guides. I must be missing something but can't tell what.  Here's the details from my project:
    I'm editing in 24fps. The video files are generated in After Effects from DPX files. The timecode is based on the DPX file names, with the hour matching the Lab Roll number (so 11:00:00 for Roll 11)
    I export an EDL in CMX3600 format. I've tried both default settings and without audio. Same results. I even get the same result if I make a sequence from a single clip and try exporting that EDL.
    I don't think this is a Speedgrade issue, because if I try re-importing the EDL into Premiere, it seems like all the clips are only one frame long.
    Any suggestions about what I might be doing incorrectly would be greatly appreciated.
    Thanks,
    Lev         

    Are you wanting to just simply go from Premiere to Speedgrade? If so why not just use the "send to speedgrade" choice. Also I wanted to point out in the original thread you actually said you didn't want to use speedgrade, I've never used a EDL with speedgrade so I have 0 ideas there, but have you tried just using Premiere's built in send to speedgrade function?

  • Format specifiers in format string param.

    I use the format specifier %.8e to format a single precision 2D array into
    an ASCII file, and i wanted to know what other types of format specifiers
    i can use. But the help or the manual does not tell which types are valid.
    Where can i find out? -or can anyone tell me?
    (i use LabVIEW 6.i)
    sincerely
    /lodahl
    % Best regards;Brian Lodahl ; [email protected]
    % http://www.kom.auc.dk/~lodahl ; RISC group 850;Room A6-118;
    % RF Integrated Systems & Circuits (RISC);Aalborg University;
    % Frederik Bajers Vej 7;DK-9220 Aalborg Ø;Denmark
    clc;s=zeros(1,52);c=[+'a':+'z',' '];f=5;a=clock;a=fix(f*a(6));
    while(1)while(1)b=clock;b=fix(f*b(6));if(b~=a)break,end,end,a=b;
    str=('my name is brian and i am just another matlab hacker');
    k=find(s~=s
    tr);n=length(k);if~n,break,end;x=c(ceil(27*rand(1,n)));
    s(k)=x;fprintf('\r%s',s);end;fprintf('\n');clear%;clc;str

    Not being a C programmer (the format specifiers were originally a C tool that LabVIEW inherited), the way that I learned them was to use the Edit Format String dialog that is available by right-clicking on the Format Into String function and the Edit Scan String dialog that is available by right-clicking on the Scan From String function. You can make your formatting choices and see the resulting format specifier.
    But remember... reverse engineering is a violation of section 3 of your LabVIEW software license agreement ;-)
    -Jim

  • Format strings, need leading zeros

    I have a data input where serial data is converted to a numerical value, then multiplied by a conversion factor, and the result then converted back into a string for outputting to a data file.
    I have not been able to get small numbers, such as "497" to get converted into a string "0497". Have tried the %04d format string, which gives me an output of 4970000 - not quite what I need.
    Am using the FormatIntoString.vi, which has a "format string" input, but values which should work like "%04d" do not give me the leading zeros.
    Ideas? Thx!

    The format string works on the numeric input of the function. The string input is for adding a string prefix to the output and is not a required input. In your example, if you wire the string to a Scan From String function and wire the output of that to the numeric input of the Format Into String, everything will work just fine. I've attached a corrected VI.
    Attachments:
    TestFormat-Fixed.vi ‏14 KB

  • How to skip 3 chars when use "scanf from string" by the parameter "format string" ?

    hi, I want to read a num 123 from the string like that "sfg123" "fgd123" "ghj123"
    I know that I can use "%3s" to skip 3 chars, but it will add an output to "scanf from string"
    So, how to use parameter "format string" not only to skip 3 chars, but also add no output to the "scanf from string"
    Solved!
    Go to Solution.
    Attachments:
    1.JPG ‏15 KB

    Hi Chenyin,
    Try this VI....
    I think... This is what you are expecting....
    <<Kudos are welcome>>
    ELECTRO SAM
    For God so loved the world that he gave his one and only Son, that whoever believes in him shall not perish but have eternal life.
    - John 3:16

  • ORA-01861 literal does not match format string, ORA-02063preceding line fro

    We have upgraded a client from 8.0.5 to 9.2.03. The following query is called from a report that was built using Cold Fusion5. It worked in 8.0.5, but not 9.2.03. When you run the report you get the errors
    [Oracle][ODBC][Ora]ORA-01861: literal does not match format string ORA-02063: preceding line from FRPE
    Here's the query:
    SELECT x.acct, x.obj, x.offn, x.status, x.asofdate, max( decode( x.func_id, 1, t, null ) ) UOB, max( decode( x.func_id, 12, t, null ) ) COB, max( decode( x.func_id, 24, t, null ) ) Rate_Warning, max( decode( x.func_id, 2, t, null ) ) Sector_Change, max( decode( x.func_id, 2006, t, null) ) FRRFRD , max( decode( x.func_id, 2003, t, null ) ) No_Tcode , max( decode( x.func_id, 2004, t, null) ) No_Sector FROM ( SELECT a.acct, a.func_id, count(*) cnt, 'Fail' t, b.obj, b.offn, b.status,a.asofdate FROM frpfaud@FRPE a, frpair@FRPE b WHERE a.acct=b.acct AND a.asofdate='2008-02-29 00:00:00' AND b.bnk not like 'B%' and b.obj not in ('KL') and b.obj in ('GAF') GROUP BY a.acct, a.func_id,b.obj,b.offn,b.status,a.asofdate) x GROUP BY x.acct, x.obj,x.offn,x.status,x.asofdate
    Now, this query will not work by running straight through SQL worksheet in either the 8.0.5 or 9.2.03 regions. So I guess it has something to do with Cold Fusion- which I know nothing about. Has anyone had any experience using Cold Fusion to issue a query? What would be the cause of the difference between the Oracle versions? That is the only thing that changed.
    Thanks for any input.

    I actually want the date format of DD-MON-YY. Which, from what I understand, is the default format for both Oracle 8.0.5 and 9.2.03. I'm trying to figure out why it is now displaying as 'yyyy-mm-dd hh24:mi:ss'. I could convince the client that the code needs changing if I had evidence that this version of Oracle (9.2.03) used a different default date format. Or if Cold Fusion pulls the date differently. Ughh.
    Here are the database parameters:
    SQL> show parameter nls_date_format
    NAME TYPE VALUE
    nls_date_format string
    select sysdate from dual;
    SYSDATE
    26-FEB-08
    1 row selected.
    select * from nls_session_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_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_COMP BINARY
    NLS_LENGTH_SEMANTICS BYTE
    NLS_NCHAR_CONV_EXCP FALSE
    17 rows selected.
    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 WE8MSWIN1252
    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 BYTE
    NLS_NCHAR_CONV_EXCP FALSE
    19 rows selected.

  • Java.util.Formatter format string for week of year?

    What is strange in the Formatter API, regarding dates, is that there is no format string to display week of year. To display day of year e.g. you can use:
    String.format(�%tj�),Calendar.getInstance())but what is the string for week of year?
    String.format(�%tw�),Calendar.getInstance())doesn�t work.
    Any ideas, or did I overlooked the API?

    I �m using
    String.format(�%tx�),Calendar.getInstance())everywhere in my code where x is any of the other (e.g. j, d etc.). Why use different way for this? How come Sun did�t add e.g. a w in the API to display the week of year as it does for day of year?

  • ORA-01861: literal does not match format string

    Hi Experts,
    Whenever i am running the my procedure in oracle appliactions i am getting this error.
    ORA-01861: literal does not match format string .
    pkg is below:--->
    CREATE OR REPLACE PACKAGE Arc0471_Pending_Crc_Prc_Pkg IS
      --Insert into Custom Table
        PROCEDURE Arc_Insert_Data(P_ORG_ID VARCHAR2, P_BC_CODE VARCHAR2, P_GL_DATE VARCHAR2, P_DB_LINK VARCHAR2);
    END Arc0471_Pending_Crc_Prc_Pkg;
    CREATE OR REPLACE PACKAGE BODY Arc0471_Pending_Crc_Prc_Pkg IS
            PROCEDURE Arc_Insert_Data(P_ORG_ID VARCHAR2, P_BC_CODE VARCHAR2, P_GL_DATE VARCHAR2, P_DB_LINK VARCHAR2)
            IS
              v_val         varchar2(32000);          
              v_cursor1     integer;
              v_cursor2     integer;
              v_returncode  integer;
            BEGIN
           v_val   := ' ';
            v_val :=' INSERT INTO ARC.ARC_CRC_PRC_INVC ';
              v_val := v_val||' (CTA_TRX_NUMBER ,CTA_TRX_DATE ,DUE_DATE ,';
              v_val := v_val||' BILL_TO_CUSTOMER_NO,     BILL_TO_CUSTOMER_NAME ,     BILL_TO_LOCATION ,';
              v_val := v_val||' BILL_TO_ADDRESS ,ORIGINAL_AMOUNT ,APPLIED_AMOUNT , EXCHANGE_RATE     ,';
              v_val := v_val||' INVOICE_CURRENCY_CODE , ACCOUNT_CLASS , GL_DATE  , CTA_CUSTOMER_TRX_ID ,';
              v_val := v_val||' ORG_ID , CREATED_BY , CREATION_DATE ,LAST_UPDATE_BY , LAST_UPDATE_DATE , LAST_UPDATE_LOGIN )';
            v_val := v_val||' SELECT  CTA.TRX_NUMBER ,     CTA.TRX_DATE , APS.DUE_DATE ,';
              v_val := v_val||' HCA.ACCOUNT_NUMBER ,     HP.PARTY_NAME ,     HCSUA.LOCATION ,';
              v_val := v_val||' SUBSTR(HL.ADDRESS1 ||'||''' '''||'|| HL.ADDRESS2 ||'||'''  '''|| '||HL.ADDRESS3||'||'''  '''|| '||HL.ADDRESS4|| '||'''  ''' ||'||HL.PROVINCE||'||'''  '''||'|| HL.CITY ||'||'''  '''||'|| HL.STATE ||'||'''  '''||'|| HL.POSTAL_CODE ||'||'''  '''||'||FTL.TERRITORY_SHORT_NAME,0,1500),';
              v_val := v_val||' APS.AMOUNT_DUE_ORIGINAL , APS.AMOUNT_APPLIED,APS.EXCHANGE_RATE, APS.INVOICE_CURRENCY_CODE, CTLA.ACCOUNT_CLASS,';
              v_val := v_val||' APS.GL_DATE , CTA.CUSTOMER_TRX_ID , CTA.ORG_ID ,FND_GLOBAL.USER_ID ,';
              v_val := v_val||' SYSDATE , FND_GLOBAL.USER_ID , SYSDATE , FND_GLOBAL.LOGIN_ID '  ;  
             v_val := v_val||' FROM ' ;
             v_val := v_val||' AR.RA_CUSTOMER_TRX_ALL CTA,';
              v_val := v_val||' AR.RA_CUST_TRX_TYPES_ALL CTTA,';
              v_val := v_val||' AR.RA_CUST_TRX_LINE_GL_DIST_ALL CTLA,';
              v_val := v_val||' AR.HZ_PARTIES HP,';
              v_val := v_val||' AR.HZ_CUST_ACCOUNTS HCA,';
              v_val := v_val||' AR.HZ_CUST_SITE_USES_ALL HCSUA,';
              v_val := v_val||' AR.HZ_LOCATIONS HL,';
              v_val := v_val||' AR.HZ_PARTY_SITES HPS,';
              v_val := v_val||' AR.AR_PAYMENT_SCHEDULES_ALL APS,';
              v_val := v_val||' AR.HZ_CUST_ACCT_SITES_ALL HCASA,';
              v_val := v_val||' GL.GL_CODE_COMBINATIONS GCC,';
              v_val := v_val||' AR.AR_RECEIVABLE_APPLICATIONS_ALL ARAA,';
              v_val := v_val||' APPLSYS.FND_TERRITORIES_TL FTL ,';
              v_val := v_val||' ONT.OE_TRANSACTION_TYPES_TL'|| P_DB_LINK ||' IND_OTT, ' ;
              v_val := v_val||' ONT.OE_ORDER_HEADERS_ALL'||P_DB_LINK ||'  IND_OH, ';
              v_val := v_val||' AR.RA_CUSTOMER_TRX_ALL'||P_DB_LINK ||' IND_RCTA   ';
             v_val := v_val||' WHERE   CTA.ORG_ID = '||''''|| P_ORG_ID||'''';
             v_val := v_val||' AND   CTTA.ORG_ID = '||''''|| P_ORG_ID||'''' ;
             v_val := v_val||' AND   CTLA.ORG_ID = '||''''|| P_ORG_ID||'''' ;
             v_val := v_val||' AND   HCSUA.ORG_ID = '||''''|| P_ORG_ID||'''' ;
             v_val := v_val||' AND   APS.ORG_ID =  '||''''||P_ORG_ID||'''';
             v_val := v_val||' AND   HCASA.ORG_ID = '||''''|| P_ORG_ID||'''' ;
             v_val := v_val||' AND   CTLA.ACCOUNT_CLASS     =     '||'''REC''';
              v_val := v_val||' AND   CTLA.GL_DATE <= TRUNC(TO_DATE( '||''''||P_GL_DATE||''''||','||'''DD/MM/RRRR HH24:MI:SS'''||'))';
             v_val := v_val||' AND   NVL(ARAA.APPLY_DATE,TO_DATE( '||''''||P_GL_DATE||''''||','||'''DD/MM/RRRR HH24:MI:SS'''||')) <= TRUNC(TO_DATE ('||''''||P_GL_DATE||''''||','||'''DD/MM/RRRR HH24:MI:SS'''||'))';
             v_val := v_val||' AND   TO_DATE(APS.TRX_DATE,'||'''DD-MON-RRRR'''||') >'|| '''02-SEP-2007''' ;
             v_val := v_val||' AND     CTA.CUST_TRX_TYPE_ID    =     CTTA.CUST_TRX_TYPE_ID';
             v_val := v_val||' AND     CTLA.CUSTOMER_TRX_ID     =     CTA.CUSTOMER_TRX_ID';
             v_val := v_val||' AND     HCA.CUST_ACCOUNT_ID     =     CTA.BILL_TO_CUSTOMER_ID';
             v_val := v_val||' AND     HCA.PARTY_ID          =     HP.PARTY_ID';
             v_val := v_val||' AND     HCSUA.SITE_USE_ID     =     CTA.BILL_TO_SITE_USE_ID';
             v_val := v_val||' AND     HL.LOCATION_ID          =     HPS.LOCATION_ID';
             v_val := v_val||' AND     HPS.PARTY_ID          =     HCA.PARTY_ID';
               v_val := v_val||' AND     APS.CUSTOMER_TRX_ID     =     CTLA.CUSTOMER_TRX_ID';
             v_val := v_val||' AND     HCASA.CUST_ACCOUNT_ID     =     HCA.CUST_ACCOUNT_ID';
             v_val := v_val||' AND   HCASA.CUST_ACCT_SITE_ID =HCSUA.CUST_ACCT_SITE_ID';
             v_val := v_val||' AND   HCASA.PARTY_SITE_ID=HPS.PARTY_SITE_ID';
             v_val := v_val||' AND     ARAA.APPLIED_CUSTOMER_TRX_ID(+) = CTA.CUSTOMER_TRX_ID';
             v_val := v_val||' AND   IND_RCTA.TRX_NUMBER = CTA.TRX_NUMBER';
             v_val := v_val||' AND     TO_CHAR(IND_OH.ORDER_NUMBER) = IND_RCTA.CT_REFERENCE';
             v_val := v_val||' AND     IND_OTT.TRANSACTION_TYPE_ID = IND_OH.ORDER_TYPE_ID';
              --v_val := v_val||' AND   ARC.Arc0463_Get_Remng_Amt(APS.TRX_NUMBER,'||''''|| P_GL_DATE||''''||','||'APS.INVOICE_CURRENCY_CODE) <> 0';
             v_val := v_val||' AND   IND_OTT.NAME IN ('||'''D0M RC Imported Sale'''||','||'''D0M RC Indigenous Sale'''||')';
             v_val := v_val||' AND   GCC.CODE_COMBINATION_ID = CTLA.CODE_COMBINATION_ID';
             v_val := v_val||' AND   GCC.SEGMENT1 = '|| ''''||P_BC_CODE||'''';
             v_val := v_val||' AND   HL.COUNTRY = FTL.TERRITORY_CODE';
             v_val := v_val||' AND   FTL.LANGUAGE = USERENV('||'''LANG'''||')';          
                v_cursor1 := dbms_sql.open_cursor;
              dbms_sql.parse(v_cursor1,v_val,DBMS_SQL.NATIVE);
              v_returncode := dbms_sql.execute(v_cursor1);
              dbms_sql.close_cursor(v_cursor1);
         COMMIT;
         EXCEPTION     
                    WHEN DUP_VAL_ON_INDEX THEN
                                    NULL;
                   WHEN OTHERS THEN
                        COMMIT;
                   FND_FILE.PUT_LINE(FND_FILE.OUTPUT, 'IN WHEN OTHERS THEN OF INSERT INTO ARC.ARC_CRC_PRC_INVC'||SQLCODE || ' - ' || SQLERRM);
                -- dbms_output.put_line(sqlcode||sqlerrm);
            END Arc_Insert_Data;
    END Arc0471_Pending_Crc_Prc_Pkg;in above procdure APS.TRX_DATE having the format like this..23/3/2006. in Backend this procedure is working fine ..in toad(version 8.0.0.47). database is 9.0.
    but in oracle apps it is giving error like "literal does not match format string".
    please give me the solution...
    Thanks in ADv...

    Hi,
    It is the Date Data type...There's your problem then; NEVER, EVER, EVER to_date a date!! As you have discovered, it leads to problems when your code is run on different clients due to the different NLS settings they may have. You've been lucky, in other words, that your code has been working at all!
    What to_dating a date does is this:
    to_date(to_char(date_value, <format in NLS_DATE_FORMAT parameter>), <format in NLS_DATE_FORMAT parameter>) You've been lucky because your NLS_DATE_FORMAT has the same format as the data, on your client. On the database, however, it is clearly different.
    Simply remove the to_date from your already-a-date value, and you should find that it works fine.

Maybe you are looking for