SimpleDateFormat and French

Hi,
I use SimpleDateFormat for converting a string to Date.
My input will be a String in MMM DD, YYYY format and I want the output in yyyy-MM-dd format.
The piece of code I hv written works well for English, but not for French.
My code:
     String substituteValue = "Avr 06, 2005";
     SimpleDateFormat objLaunchDateFormatTo = new SimpleDateFormat ("yyyy-MM-dd",locales);
     SimpleDateFormat objLaunchDateFormatFrom = new SimpleDateFormat ("MMM dd, yyyy",locales);
     java.util.Date objLaunchDate = null;
     ParsePosition pos1 = new ParsePosition(0);
     String strFormattedDate = null;
     try {
          objLaunchDate = objLaunchDateFormatFrom.parse(substituteValue,pos1);
          System.out.println("objLaunchDate : "+objLaunchDate);
          strFormattedDate = objLaunchDateFormatTo.format(objLaunchDate);
          substituteValue = strFormattedDate;
          System.out.println("substituteValue : "+substituteValue);
     catch (Exception eParse) {
          eParse.printStackTrace();
          System.out.println("Catch Block : substituteValue : "+substituteValue);
     }In line 1 I am giving String substituteValue = "Avr 06, 2005";
It is not getting converted to Date object.
But if I give it as String substituteValue = "Avril 06, 2005";
then it works fine.
Pls let me know whether this is the JAVA's specification as for as French language is concerned or is there anyother way by which I can achieve the reqd functionality.
Thanks in advance. Pls help me to resolve the problem.
Thanks & Regards,
V.Ganessin

Hi,
I forgot to include one declaration statement
Locale locales = new Locale("fr","");

Similar Messages

  • I am trilingual how can I use pad in English spanish AND french?

    Bought my I pad in México however I am trilingual, and constantly write in English, Spanish and French.
    i don't want a predetermined language need accents for french

    Go to Settings > General > International > Keyboards > check those you want to use.
    Then when a keyboard comes up there will be a globe symbol next to the space bar, tap that to cycle through the keyboards to the one you want...that also links the appropriate dictionary.

  • Missing translations for Italian and French

    Hello Experts, I have successfully installed a ECC 6.0 server-ABAP +JAVA system (DB2 v9.5 FP4 windows server 2008-x64 bit). Kernel: 700 , Patch: 185 ; SP level : rel 700 , level 17. I have created 3 clients : 100, 700, 701
    I have installed 2 languages apart from default ones -- Italian and french.
    My issue is there are missing translations for few transactions when i log in italian and french and this problem is only with client 100(clients 700, 701 have no missing translation issue).
    For example, if i log in to client 100 in Italian or French and go to t-code FS00, the Tabs(Type/descripton,control data,Create/bank interest , Key word/translation, Informamtion (C/A)  ) are displayed in english instead of italian or french.
    I have already followed Note 1156507 - Language supplementation, RSREFILL and client maintenance.Still facing the same issue.Requesting expert help.

    Hi ,
    Refer sap note 1159021-in client 100, 518950-efforts to translet the language.
    You can run client maintainance again in client 100 and check.
    let us know, further.
    Thanks
    R.

  • Codecs displayed in Chinese and French ...

    For some reason on my MBP, some FCP easy settings codecs are described in Chinese, whilst on my G5 they are sometimes in French. As I am British this is rather annoying!
    I have deleted all languages other than English from FCP and my System Prefs are set to English too.
    I have trashed preferences (FCP Attic), deleted all the Easy Setups and Custom Setups and replaced them with the English setups directly from the FCS2 install disk (using Pacifist), but I still have some Chinese and French settings turning up!
    I have even checked the remaining setup files using Textedit and they all seem to be in English. I can't even locate any of the errant files.
    Can anyone help me get rid of these very, very annoying interlopers?
    HELP
    Thanks in advance
    Dominic

    I can understand that concern, X.
    Our forums font expert, Kurt Lang, has an interesting online article in which he states:
    "Apple has made it nearly impossible to remove critical fonts in Leopard, 10.5. If you attempt to remove protected fonts from the /System/Library/Fonts/ folder, the OS will tell you that you cannot remove the font(s) and replaces them from copies in another location. Sometimes immediately, at other times, after you have restarted. Even if it doesn't immediately replace Lucida Grande, the OS continues to use it from the protected location, preventing you from losing control of your Mac."
    Of course, a lot of folks are not using Mac OS X 10.5, so yeah, they should be extra careful with this stuff.
    You can find the whole thing, here: http://www.jklstudios.com/misc/osxfonts.html. It's a good read.
    Message was edited by: Nick Holmes

  • Maintaining F1 help in English and French

    Hi,
    I have a request for all users to have the SRM in English.
    But in France, we would like to have the context menu in French.
    With above requirement, I have following questions: -
    1. Can this online help overwrite standard one if standard one exists? If yes, how?
    2. Can we maintain translations and propose choice of language if the user is connected in EN or will we have to maintain the u201CEnglishu201D text both in English and French?
    3. What is the procedure to maintain this Context help? Creation in dev system and then transport?
    4. Can we highlight somehow the fact that for a specific field we have a context help?
    Please help,
    Amey

    Hi,
    if you want to provide F1 help in both EN and FR while users are logged on in EN, then this is a customer specific requirement.
    SAP standard would be that English speaking users logon with EN (and getting F1 help in EN only - without a choice to select an alternative language) and French speaking users logon with FR (getting both F1 help and standard menus in FR).
    Of course you can extend the SAP standard help by additional texts, but this is somehow treated like a modification and you need to save this during upgrades or applying support packages ...
    Hence I would  recommend to use the standard and let French speaking users logon in French.
    Best regards,
    Nils Buerckel

  • Can iCal use both English and French languages or does the System software need to be either French or English?

    Can iCal use both English and French languages or does the System software need to be either French or English?

    joanfromardon wrote:
    Can iCal use both English and French languages or does the System software need to be either French or English?
    The calendar language is determined by system prefs/language & text/formats.
    The app language is determined by system prefs/language & text/language, or you can probably use
    http://www.tj-hd.co.uk/en-gb/languageswitcher/

  • Both English and French are shown in reports

    Hi, Experts,
    I set up language as 'English'. But when I print reports, all titles, columns and rows are shown both English and French. How to let them show only English?
    Thank you!
    Lorrie

    Hi Lorrie
    1.Go to PLD
    2.On the Menu bar , display document  properties
        Change the language into English and uncheck Foreign .
    Your problem should be solved .
    Note: If it solve your problem, close the thread and mark as answered
    Thank you
    Bishal

  • SimpleDateFormat and Timestamp does not exist in the 1.6 JDK (1.6.0_18)

    I am trying to compile a program with SimpleDateFormat and I get "cannot find symbol". I'm using Netbeans and Maven and in Netbeans, the software finds the correct import java.text.SimpleDateFormat, so it's not a question of the definitions not being there, it's the compiled classes that are missing somehow.
    Any ideas what could be the problem?
    My classpath: CLASSPATH=.;C:\Program\Java\jdk.1.6.0_18\jre\lib\resources.jar;C:\Program\Java\jdk1.6.0_18\jre\lib\rt.jar;C:\Program\Java\jdk1.6.0_18\jre\lib\sunrsasign.jarI reinstalled both netbeans and the JDK (after first uninstalling them, then removing any remaining files manually and then rebooting my computer).
    This simple application demonstrates the problem:
    import java.text.DateFormat;
    import java.text.SimpleDateFormat;
    public class DatabaseBuilder
        private DateFormat m_formatter;
        public DatabaseBuilder()
            m_formatter = SimpleDateFormat( "yyy-MM-dd HH:mm:ss" );
    }Resulting output:
    DatabaseBuilder.java:10: cannot find symbol
    symbol  : method SimpleDateFormat(java.lang.String)
    location: class DatabaseBuilder
            m_formatter = SimpleDateFormat( "yyy-MM-dd HH:mm:ss" );
                          ^
    1 error

    dh-at-cross wrote:
    On the internet it is easy to be misunderstood and to me your message came across much more "read the error message, stupid" than you intended I just wanted to let you know.I'm aware that it's easy to be mis-understood on the internet. But to be totally honest: that's a risk, I'm willing to take.
    The alternative is to be extremely polite in every post and add an extensive disclaimer describing my very intent in addition to the pure technical discussion.
    But I choose not to do that (and thus tolerate a (hopefully) small number of people who are offended by me) for several reasons:
    - I'm to lazy to write that disclaimer
    - writing it would cost time, which I can use better for helping others or getting some work done
    - writing that disclaimer would give people the impression that it will always be that way, but it's not true: you'll have to be able to deal with technical criticism in the technical world
    - if someone wants to feel offended, they will find a reason, no matter how polite I am

  • Verity collection and French Accents

    I have a problem I have this french website I'm trying to
    manage but I'm having trouble with the stupid french accents. If I
    get the data from the database with a cfquery no problem I jsut add
    a cfcontent tag with the corect local and bingo all is good.
    Now when I ptu the data from the database in a collection
    then start the problem. I tried with meta tag and cfcontent and a
    bunch load of other stuff but I still get ??? in stead of the
    éèçà and so forth. Now my database is mysql on
    french local, collection was created with the language french
    option.
    I'm not sure what else to try to get those weird char to go
    up.

    I folowed this link
    http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=tn_18163
    and I did try to go in the style.uni and change all the
    charset form 1252 to 8859 then reindex the collection but it did
    not work. I tried diferent language for the create collection but
    still no luck.
    I still cant find a way to change the charset for my
    collection. My datasource has the right charset since with a
    cfsearch I get what I want, but it is not a very efective way to
    search.

  • Support for Canadian English and French in OBIEE

    I would like to know whether OBIEE supports Canadian English & Canadian French. I have looked at several documents and links pertaining to the "Language Support", but am still unclear whether they are supported.
    Many thanks for your assistance.
    Regards,
    Hareesh

    Well it's certainly no small task you're undertaking there, but there are a couple of ways of doing it as far as I know.
    The first is to store all the phrases in all languages in an XML file, then pull the correct outputs depending on the current language. For example: (pseudo, obv)
    <xml>
        <dict lang="EN-US">
            <phrase id="1" value="Hello there. Welcome!" />
            <phrase id="2" value="Sorry to see you go, goodbye!" />
        </dict>
        <dict lang="FR">
            <phrase id="1" value="Bonjour. Bienvenue!" />
            <phrase id="2" value="Ah, le chat des ami. Au revoir!" />   
        </dict>
        <dict lang="ES">
            <phrase id="1" value="Hola! Bienvenido!" />
            <phrase id="2" value="Lo siento, pero tu hermana es muy guapa!" />   
        </dict>
    </xml>
    You then load each language into a structure in the APPLICATION scope (call it APPLICATION.LANG), then pretty much everywhere in your code you need to output something you'd instead do:
    <cfoutput>#APPLICATION.LANG[SESSION.language].phrase1#</cfoutput>
    Or similar.
    The other approach is similar, but involves having the phrases saved in database tables and doing a similar thing.
    And sadly no, you'll struggle to find anything that can reliably translate for you - certainly not a database.
    O
    PS languages are not my strong point, as you may have noticed.

  • Compatibility Chinese and french keyboard

    Hi guys
    I'm french and I need to write in chinese with my computer
    the problem is :
    on tiger, no problems it worked, it reconized my AZERTY keyboard
    but now on lepard : problem
    my keybord becomes a QWERTY , not easy to use for a french guy!
    is there any solution ??? (I know that you can change in japanese, why not in chinese ? )
    Chinese : ITABC (I do not study traditional)
    thanks a lot
    xavhan

    See this thread:
    http://discussions.apple.com/message.jspa?messageID=5668475#5668475
    and the Chinese-Mac mailing list:
    http://groups.google.com/group/chinesemac/

  • SimpleDateFormat and Daylight Savings Time

    I am trying to parse into a Date "April 15 1999" with "MMM d YYYY" using SimpleDateFormat. This string parses w/out error and the resulting Date is: Thu Apr 15 00:00:00 PST 1999. This is correct in that I am in California. The problem is that 4/15 is Daylight Savings Time in 1999. The getTimeZone result for the parent DateFormat is "SystemV/PST8PDT". I have wrestled with this for over a day now, I admit it, I need help.
    Anyone have any ideas what could be happening here?
    Thanks
    Roger

    When I run BigDaddy's code I get MST for the TZ (which is correct, my default is Mountain TZ and we don't observe DST. By this I surmise that BDLH's default is Pacific TZ and that it observes DST. The following code shows the setting of the TZ to "America/Los_Angeles" and produces the correct result. Windows XP.
    import java.text.*;
    import java.util.*;
    public class PTest {
        public static void main(String[] args) throws ParseException {
            SimpleDateFormat sdf = new SimpleDateFormat("MMM dd yyyy");
            Date dte = sdf.parse("April 15 1999");
            System.out.println(dte);
            SimpleDateFormat sdf2 = new SimpleDateFormat("MMM dd yyyy zzzz");
            sdf2.setTimeZone(TimeZone.getTimeZone("America/Los_Angeles"));
            System.out.println(sdf2.format(dte));
    }

  • Help with SimpleDateFormat and time

    Hi,
    I have a strange result when formating a time!
    Time test = new Time(0);
    DateFormat df = new SimpleDateFormat("HH:mm:ss");
    System.out.println("my date: "+ df.format(test));
    Result is 01:00:00
    Why is this not 00:00:00
    Thanks in advance,
    Pieter

    A Date object represents a moment in time, which can have different textual representations. A Date is represented in Java by a number of milliseconds counted from a fixed moment in time: 00:00 UTC on January 1, 1970 AD (using the Gregorian Calendar), which is the same as 01:00 CET. If that is not the time you mean, you should create a date with a different number of milliseconds (or better yet: use the Calendar class to specify the exact date, time and timezone you mean).
    It doesn't matter what timezone the server is set to or what timezone anything is set to, the Date still represents the same moment in time. The only time it matters is when you want to output a Date for a human to read. If you want everyone to just see the same numbers, explicitly set the timezone on your DateFormat to something fixed (I recommend "UTC" over anything else). Just make sure everyone understands which timezone you use.
    Storing the time as seconds will not help - it already stored as (milli)seconds anyway - nor will any other kind of converter: (Simple)DateFormat already has the capabilities to "convert" Strings to and from Date objects (note that using a DateFormat does NOT change the date in any way, it just displays/parses the date in an appropriate format/timezone).

  • URLScraper and French Locale

    I'm trying to set up a multilingual portal at the company (fr & en more may follow). I can't figure out how the URLscraper would handle french. I noticed that there is a separate .properties file for french titles, etc. but how can the scraper sling french content rather than english content to the user based on language preference?
    Do we have to:
    1. create a separate role and/or scraper for french and english?
    2. Make sure the content is bilingual?
    3. Scrape a custom JSP provider that reads the local attribute and serves content in the appropriate language?
    4. Other?
    Your input would be greatly appreciated.
    Thanks & Cheers,
    -Dug

    The problem is portal does not support localization per channel, hence there is really no configuration you can do to acheive that. Looking at the options you have listed.
    1.) This is possible if the user would always see content only for his local if that is the case then you can create seperate channels for your locales then put users in seperate roles based on the locales serve appropriate content.
    3.) you can write a jsp to scrape the content yourself. THe jsp can display the content based on the local selected for the user. This is the most general option of the 3 and probably the most flexible for you ..

  • ZipFile and french accent

    Hi,
    I have a problem with using the "java.util.ZipFile" library.
    Imagine that I have a zip file containing text files with names including french accents.
    The code to open and extract the files is simple :
    - I get each "ZipEntry";
    - get an InputStream;
    - convert to a bufferedInputStream;
    - use the read method;
    - save the data.
    But when the read method is executed the "java.io.IOException: Stream closed" message is displayed.
    If my zip file don't have file with name containing french accent, the code run without problem.
    If someone know how to resolve the problem...
    NB : I can't avoid the use of french accent.
    THANKS
    MY CODE :
    try
    String absoluteZipFileName = "C:\\temp\\fichier.zip";
    String destDir = "C:\\temp\\";
    zipfileName = new ZipFile(absoluteZipFileName);
    for (Enumeration iter = zipfileName.entries(); iter.hasMoreElements();)
    FileOutputStream FOS = null;
    BufferedOutputStream BOS = null;
    BufferedInputStream BIS = null;
    try
    int max = 2048;
    ZipEntry zipEntryTest = (ZipEntry) iter.nextElement();
    String fileName = zipEntryTest.getName();
    BIS = new BufferedInputStream(zipfileName.getInputStream(zipEntryTest));
    FOS = new FileOutputStream(destDir + fileName);
    BOS = new BufferedOutputStream(FOS, max);
    int nbr = 0;
    byte data[] = new byte[max];
    while ((nbr = BIS.read(data, 0, max)) != -1)
    BOS.write(data);
    catch (Exception a)
    System.out.println(a.toString());               
    finally
    BOS.close();
    FOS.close();
    catch (Exception e)
    System.out.println(e.toString());
    finally
    try {zipfileName.close();} catch (Exception e) {}
    THE ERRORS :
    java.io.IOException: Stream closed
    java.io.IOException: Stream closed

    Why the java zip classes cannot work with zip files
    created by other utilities (e.g. WinZip or Linux's zip
    program) when they contain accented characters is a
    question that I cannot answer, but it certainly looks
    like a bug within the Java classes. It's not exactly a bug, I don't know what you would call it. When you look at the zip file specification ( http://www.pkware.com/products/enterprise/white_papers/appnote.html for example) you'll notice that the file name needs to be stored in bytes, but there is nothing to indicate which bytes. In particular it doesn't specify what encoding it assumes the file name is in.
    This isn't surprising given that the format dates back to a time when only ASCII characters could occur in file names.
    I suspect that if you used Java to create a zip file containing the file "sacr&eacute;bleu.txt", you would be able to extract that file using Java also. Most likely WinZip and the Java API code use different, incompatible, ways of encoding that file name. Using a hex editor to examine what they produce should display the difference.
    The reason I said it wasn't exactly a bug is that the specification is incomplete. But you could argue that what PKZip actually does is the de facto standard, and presumably WinZip does the same thing that PKZip does.

Maybe you are looking for

  • Client printer on oracle application server

    Hi all. I configured my own system on oracle application server and I connected my printer on client machine. When I wanted to print through the application server on the printer I did not print. Please could anyone shows me where is the error file (

  • How to use  two monitors with my Mac mini

    Hello, I have a Mac mini and using a 20" Samsung Monitor with it which works well. I also have my 40" LCD Samsung telly, set up next to it. Whenever i watch a DVD using my Mac i have to swap over the cables. Is there a way of getting the right cables

  • Problem in alv output download

    HI All, My problem is My alv output table contains long text with value as 1000 characters. when i am downloading my alv output into excel, it is downloading only 255 characters length. is there any ways to download the entire long text into excel. P

  • JTAPI + Xtapi: Urgent help needed with compensation.

    Hi I'm new to jtapi. I'm using xtapi implementation with the following statements in Outcall.java sample code. import javax.telephony.*; import javax.telephony.events.*; //import MyOutCallObserver; public class Outcall {   public static final void ma

  • Check/Uncheck issue in ADF Tree

    Hi, I am using JDev 11.1.1.5.0. Iam trying to create a ADF Tree from Single VO object with self-reference with check box option. Iam able to create required ADF tree with checkbox option. Some how, unable to provide select-deselect functionality. I m