Is there anyway to parse all Date format?

I have a string here which represents a date, but the problem is that it could be in mm/dd/yy or yyyy.MM.dd format, how can I make my parse to recognize all format might appear? Thanks in advance

use for java 1.4.01
try
ResourceBundle r = ResourceBundle.getBundle("sun.text.resources.LocaleElements",Locale.US);
/* ResourceBundle r = ResourceBundle.getBundle("java.text.resources.LocaleElements",Locale.US);
for java 1.3*/
String[] s = r.getStringArray("DateTimePatterns");
System.out.println(" &&&&&&&&&&&& "+s[2]+" ^^^^^^^^^^^^^^^^^^ "+s[7]);
catch (java.util.MissingResourceException e)
System.out.println(" ###"+e.getMessage());
s[0] // full time pattern
s[1] // long time pattern
s[2] // medium time pattern
s[3] // short time pattern
s[4] // full date pattern
s[5] // long date pattern
s[6] // medium date pattern
s[7] // short date pattern

Similar Messages

  • Is there anyway to open a mobi format book on ipad without installing the kindle app but any other app

    Is there anyway to open a mobi format book on ipad without installing the kindle app but any other app

    Have you tried GoodReader? It claims to handle very large file sizes and it's very good for annotations. It's my PDF reader of choice on the iPad
    From the GoodReader manual:
    File types to view in GoodReader
    There are two types of viewing engines - the ones that we've written ourselves, and the built-in device's standard viewing engine. Our own engines provide great flexibility and many additional features not found in the built-in engine (for example, opening very large files). The built-in engine is very powerful and knows many file formats, but has many limitations and no additional features.
    Files of very big size (our own viewing engine):
    very large PDF files (including password-protected). File size is not the limit. Revolutionary PDF Reflow (Extract Pure Text) mode. See Viewing PDF Files for details.
    very large TXT files. See Viewing TXT Files for details.
    high-resolution pictures and other graphic files (including slideshow viewing mode). See Viewing Pictures for details.
    And as a free bonus - files of normal size (iOS standard viewing engine):
    all file formats supported by Safari engine: Microsoft Office files - Word, Excel, PowerPoint, HTML files and Safariwebarchives
    iWork'08/09 files - Pages, Numbers, Keynote (files must be saved with Include Preview option)
    .ai files saved with PDF Compatible option
    audio files (natively supported by iOS)
    video files (natively supported by iOS)

  • Is there anyway to view ALL 'things' added to my Macbook pro in chronological order?

    Is there anyway to view ALL 'things' added to my Macbook Pro in chronological order?

    From the Finder menu select View>Show View Options. Then check the Date Created box only.

  • I had bookmarks on an older computer. When I got my new one my husband took over the old one and deleted firefox before I had a chance to get my bookmarks. Is there anyway to find all those bookmarks I had?

    I had bookmarks on an older computer. When I got my new one my husband took over the old one and deleted firefox before I had a chance to get my bookmarks. Is there anyway to find all those bookmarks I had?

    Hopefully he didn't delete the Firefox Profile folder. <br />
    http://support.mozilla.com/en-us/kb/Profiles#How_to_find_your_profile
    http://support.mozilla.com/en-US/kb/Recovering+important+data+from+an+old+profile

  • HT1766 Is there anyway to restore all photos, apps, etc onto an iPad using the most recent iCloud back up from an iPhone? I did a backup on my iPhone today but when I restored my iPad using that backup, only the photos in the photostream transferred to th

    Is there anyway to restore all photos, apps, etc onto an iPad using the most recent iCloud back up from an iPhone? I did a backup on my iPhone today but when I restored my iPad using that backup, only the photos in the photostream transferred to the iPad?

    In technical support, sometimes you have to make educated guesses. I'm sorry that you were offended.
    iTunes does prompt when it is going to erase a device, and the message is clear.
    She said in her message that she was able to successfully sync the old ipad. This indicated to me that itunes wiping the data was not an issue, because either it had been setup at the apple store (in which case it doesn't actually wipe the ipad despite saying it will*) (*based on a single case I saw), or because the itunes media folder was migrated.
    Furthermore, my solution was to tell her how to backup her ipad (by either doing it manually, or as a last resort, by deleting the corrupt backup -- that she couldn't access anyway.)
    I got that last part of the instructions from the "Taking Control of your iphone" book which I found samples of when I did a google search for "corrupted backup itunes".
    She marked this as a solution, so it worked for her.

  • Is there anyway to pull the data from an iPhone/iTunes backup file?

    Is there anyway to pull the data from an iPhone/iTunes backup file so it can be read and imported into a DROID phone. Have a customer with a dead iPhone and they went out and purchased a DROID as a replacement and would like all their contacts to be imported into the DRIOD. Is there any software out there that can do this?

    Here is one that can at least get at the data: iPhone Backup Extractor
    There may well be others of better value. Google is your friend.
    You'll probably need to do something with the data you can extract, like add it to Outlook, rather than being able to send it directly to the driod.
    tt2

  • To accept all date formats for variables

    Hi,
    I am getting a vadidation message on refresh of a query on entering European date format in the selection criteria "Please enter value in permitted format for variable XXXX"
    I need date to accept all date formats for variables to execute query.
    Currently US date format has been accomodated, On entering European date format i get the above validation message.
    Please suggest how do i supress this validation message or any other thoughts on the same.
    If anyone experienced the same before or applied any notes plz send the SAP Note number for the same. I am currently on BW 3.5.
    Message was edited by:
            tyson m

    tyson,
    why dont you control the date display through the user creation / user details option - then your date entries should sort themselves out.
    Arun

  • Is there anyway to close all open apps at once?

    Is there anyway to close all open apps at once?

    Unfortunately, there is not a way now to close all apps at once. You will have to close them one by one.

  • HT201269 if my iphone is crushed and will not read onto itunes/sync, is there anyway to access the data and back it up?

    if my iphone is crushed(droped and ran over...) and will not read onto itunes/sync, is there anyway to access the data and back it? i really dont want to lose the progress in the apps that i play often....

    i wasnt expecting to acompish it... just wondering if there was another method, and was trying to have a little hope but thank you

  • Is ther anyway to remove all tunes marked with the !

    I had a system failure and lost a large amount of my library which now shows with the ! and I want to get rid of them and selectign and pressing delete is not an option as there are too many to do. I do not wnat to delete all and re read them in, althought that may be the last resort. Even being able to sort them so I can easily select all and delete them woudl be usuefull
    Thanks

    "bcrs" <[email protected]> wrote in message news:[email protected]​ups.com...
    Hi all,
    Im new to this group. I need suggestions and comments from you all.
    I came to know that the password is stored in vi itself when we protect
    the vi.(im not sure about it, if anyone knows it please let me know ).
    If the password is not stored in vi itself, where is it stored ?
    So Is there anyway to open the vi in HEX code format and remove the
    password?
    Thanks in advance
    regards
    Bharat
    Probably (I wouldn't know, reversing is illegal , the password is a hash of the password and the vi data/code. So removing it would be as simple as removing the hash from the file in a hex editor. But LabVIEW won't open it, because the hash is wrong.
    Hope it help (but I guess it won't).
    Wiebe.

  • Is there anyway to transfer all of my downloads on my ipod to a computer that it has not been synced on?

    ok. so i made a new account on my computer and am wondering if a can transfer all of my data on my ipod to itunes. When i try to put new music or apps on using the computer it says i have to delete everthing and sync it to this computer. is there anyway getting around that??

    Use on of the third-party (not Apple) programs discussed here:
    new PC: Apple Support Communities

  • Hi, i just reset my iphone, but i forgot that i do not use icloud, and i lost all my pictures now. Is there anyway to restore all the pictures. please help me

    hi, today i just reset my phone, and i forgot that i do not use icloud, so i lost all mu pictures. Is there anyway to restore the pictures. Please help me ><" thanks a lot

    Omg:( kill me then. I store my photos in my laptop. But i reset my aunt's phone, and she doesnt have anything: no apple id, no icloud. Normally when i reset mine, my phone back up everything.
    Anyway. Thanks a lot

  • HT201274 Hello there, I have erased all data and settings from my IPAD about 10 hours ago and it just shows a line across it with the apple logo, it wont connect to my laptop either. Please help

    Hello there, can someone help me please. I erased all data and settings last night and now my IPAD just shows a line across it with the apple logo. It is not responding to the on / off switch. I have connected the IPAD to my laptop so i can reinitilise it but nothing is happening - it doesn't appear as a device on my laptop (the USB port is working OK) Has anyone else experienced this and how did you overcome it? Thanks

    thanks for the reply gdgmacguy! but is there any way to stop it? i was thinking of just manually uninstalling apps and deleting contacts. i cant wait any longer, lol.

  • How can I parse this date format?

    Hey,
    i am trying to write an interface between two applications. One application gives me the following date:
         Wed Jul 16 12:18:20 CEST 2003
    but I need it to look like this:
         16.07.03 12.18:20
    I tryed to use Date and DateFormat to parse and change it but the Date was unparseable.
    I hope somebody can point me to the right direction or show me how I can do the formating.
    Thanx a lot!
    Martin

    If this isn't a well-known date format, I can't see any solution but to write small function yourself which doe the job.
    you can start with :
    String source = "Wed Jul 16 12:18:20 CEST 2003";
    String[] elements = source.split();//splits source around spaces
    then you write functions that map day of week with numbers
    "Mon" --> 1
    "Tue" --> 2
    etc...
    it won't take you days to write this.
    Sometimes it's faster to write the stuff yourself than spending days looking for something pre-defined that may or may not exist.

  • I recently got my long desired MAC, after my laptop crashed.  Is there anyway to get all of the music that I have already invested in, in iTunes, on my new Mac?  I thought that it had been saved to an external hard drive, but there were only photographs.

    I recently got my long desired MAC, after a laptop died over a year ago.  Isn't there someway to get all of the music and movies that I've already invested in, off of iTunes?  Don't they have a record of my purchases, that could be downloaded to this new computer?  I thought I had it on an external hard drive, after a friend tried to save my itunes and photographs, but there are only photographs on the hard drive.....  Any help would be most appreciated!  Thanks!

    Hello kc9agz,
    Thank you for contacting Mozilla Support. Did you back up your bookmarks before you moved to the new computer? You can find more information about backing up and restoring bookmarks in this article.
    [[Restore bookmarks from backup or move them to another computer]]
    Please let us know if this solves your issue.
    Cheers,
    Patrick

Maybe you are looking for

  • Vendor employee

    hi, in want create a Vendor in my vendor master records so that when ever a loan given to employee is recoded to vendor account. could u ple give me the accounting entries 1-when the loan is given to employee 2-loan reimbursement by the employee ther

  • Lost MPEG-2 after archive and install

    I bought and used the MPEG-2 playback component but MPEG Streamclip no longer believes it is installed after a recent archive and install of Leopard. I still have my confirmation email of purchase, but there's no indication as to how to reinstall or

  • I need a program to do a playlist with my DVD on a projector

    Hello, I have a library of my DVD on my hardisk. I'm searching for a program that can play a selection of my DVD (or maybe mpeg files) to show on a LCD projector linked at my mac. there's any program to do that ? (I'm sorry If I'm in the bad forum fo

  • Clearing Doc has been reversed, but still assigned to Original Document

    Hi, Here's the condition: - Clearing document has been reversed, but instead of using FBRA, user use FB08. - Now the document still assigned to this clearing doc. - In FBL5N this doc is open (in BSIS table it does't have clearing doc also) , but when

  • Purchase requistion number not been generated for material shopping carts

    Dear Experts, I am able to create a purchase requistion for text shopping carts once it is approved. For material if i create a shopping cart then status is showing approved(activated workflow without approval) but purchase requistion number not been