How to change a date in one format to the other?

Hi,
Say I have a String representing a date in the following format:
dd/MM/yyyy e.g. 12/03/2002
How can I convert this String to a String representing a date the following format:
ddMMyyyy e.g. 12032002
Without using the String class.
Thanks

Let's write some code here:
String f1="dd/MM/yyyy";
String f2="ddMMyyyy";
String d1="12/03/2002";
String d2=null;
You want d2 of format f2, given d1 with format f1 =>
SimpleDateFormat formatter1 = new SimpleDateFormat (f1);
SimpleDateFormat formatter2 = new SimpleDateFormat (f2);
ParsePosition pos = new ParsePosition(0);
java.util.Date dateTemp = formatter1.parse(d1, pos);
d2 = formatter2.format(dateTemp);
That should work.
Diego

Similar Messages

  • How to pass Data from one form to the other

    Hi all
    Can any one suggest me how to pass data from one form to the other form, which i zoomed from the original one?
    I tried to do this by passing parameter in Event Procedure but i am getting error msg when i am opening the zoomed form.
    If any one of u have any idea, give me a reply
    Thank you
    Suhasini

    If you choose the second alternative you should erase these global variables after the second form is opened
    You can erase the global variable using:
    erase('global_var')
    Greetings,
    Sim

  • When I use Home sharing, I can see the library I want to copy, but when I highlight the library, the import button does not show up. Also, it will not let me drop and drag. How do I get music from one computer to the other computer?

    When I use Home Sharing, I can see the library I want to copy under Shared, but I can't get it save on the computer under the regular library. I go to edit and "select all" but there is no import button that is in the right hand corner. Also, it will not let me click and drag the music. How do I get it from one computer to the other?

    Since both computers are connected via the network, you could simply copy the ENTIRE iTunes folder from one computer to another via the network.
    If both computers are running Windows, use the Easy File Transfer Utility built into Windows to move iTunes and all other user media/data.

  • How can I move apps from one computer to the other?

    How can I move apps from one computer to the other?
    (preferably without iCloud)

    Backup your iTunes library to an external drive and onto the other computer
    http://support.apple.com/kb/ht1751

  • How do i copy stickies from one mac to the other

    how do i copy stickies from one mac to the other?
    or are they stored in a file i can just copy them over ? if so what is the file name path?
    thanks in advance

    yes, they are stored in the file /users/username/library/StickiesDatabase. just copy it over to the corresponding location on the new computer.

  • I have a new iMac and i created two libraries on iTunes. how do i copy songs from one library to the other?

    I have a new imac. I created two libraries, one for me, one for my kids. how do I copy songs from one library to the other library?

    Not easy unless you're just content with adding some files to the other as new files but lose playlists for those files, and playcount, and ratings, etc.  If you're okay with that, you can drag the media folder from one library to the other. If you use default settings and want to duplicate the media, just drag it. If you want to add the media but leave it where it is currently located, hold down the option key while dragging to the library window.
    Otherwise:
    PowerTunes - http://www.fatcatsoftware.com/powertunes/ (commercial software)
    syncOtunes - http://homepage.mac.com/oligrob/syncOtunes/syncOtunes.html

  • How do I transfer music from one iPhone to the other without using a laptop and will I be billed?

    How do I transfer music from one iPhone to the other without using a laptop and will I be billed?

    Download Past Purchases
    http://support.apple.com/kb/HT2519
    Or do you mean this...
    Old Phone to New Phone
    http://support.apple.com/kb/HT2109
    Also...
    It should be Noted that anything Downloaded with a Particular Apple ID is tied to that Apple ID and Cannot be Merged or Transferred to a Different Apple ID

  • How do I move Events from one user to the other?

    I have two users on my PowerBook G4 and in preparation of moving all to a new MacBook Pro I want to move the pictures of one user to the other user. I've tried copying them and was successful but the Events did not copy, rather all 530 photos copied as one Event. How do I copy the photos and maintain the Events?

    iPhoto Library Manager is recommended on here many times every day. I can't recall anyone mentioning a significnt issue with it.
    Regards
    TD

  • I have a 120gb Classic that has no space left on it. i am going to buy a larger gb capacity ipod as soon as i get clearer instruction on how to get the old ipod content to the new ipod. How do you get content from one ipod to the other?

    how do you get content from one ipod to the new one? my content is on an external hard drive not on my pc and i have run out of space on my 120gb classic. can you get old ipod content to new? my itunes has only got short cuts, the real content is on an external drive? can this be done?? please help

    If the content is on an external drive, but your library knows where to find it, then it should all work. Connect your device, make some selections for what to put on it, and sync. If, on the other hand, your current iPod is the only place holding some of your media then see this user tip: Recover your iTunes library from your iPod or iOS device.
    tt2

  • If you have 2 apple ids, how do you sign out of one and into the other so you can update the app that was purchased in the other account.  thanks

    If you purchased an app in one account and work mostly in another, how do you switch the purchased app account to update it?
    thanks

    You need to sign out and back in only if you're on your Mac and you want to update the iTunes data.  You'll see a notice saying that there are five (or so) updates but when you go to download them, they're not all present.  So you download them, sign out from one ID and sign back in with the other ID.  Then you can download the remaining ones.
    If you're downloading directly to the iPad, everything is transparent.  It does not matter what ID is configured in Settings.  The iPad automatically chooses the correct ID or IDs when updates are available.

  • How can i move icons from one screen to the other?

    How do i move icons from one page to another?

    Tap and hold any icon for a couple of seconds. They'll all start to wobble. Tap and drag the one you want to move to the side of the screen and the next screen will appear; drop the icon on whatever screen you want it on.
    You can also do it quicker in iTunes - connect the phone and click the Apps tab in the main window. You'll see a picture of your phone with the apps laid out. Just click and drag

  • How to change clip speed w/o moving all the other clips in a sequence?

    when I have many clips in a sequence and try to change the speed of a clip (which changes the length) FCE automatically shifts all the following clips. is there a way to turn this feature off?

    Not in FCE. FCP 7 has that feature.
    Think about it; when you speed up a clip, the duration is shorter, therefore the clip is shorter. When you slow down a clip, the duration lengthens, therefore the clip is longer. How would FCE know that you don't want the clip to remain the same duration?
    You'll need to trim the clip accordingly based on the amount of speed adjustment you want.
    -DH

  • How can i receive message from one phone to the other

    i have iphone 4s now i want to receive one text from the another phone

    Backup your iTunes library to an external drive and onto the other computer
    http://support.apple.com/kb/ht1751

  • How do I transfer data from one pg to the next pg?

    I have a registration page that I would like to go to a
    welcome page when registration is complete. The welcome page will
    say "Welcome (name) your new username and password are (user &
    pwd)". I have tried unsuccessfully using cookies to populate the
    welcome page. Since the user will only see this welcome page one
    time, is there some other way to do this? Can I get the needed
    fields from my database? BTW - the registration page works just
    fine.

    What scripting language are you using? Why not use session
    variables?
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.dreamweavermx-templates.com
    - Template Triage!
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    http://www.macromedia.com/support/search/
    - Macromedia (MM) Technotes
    ==================
    "Mr. Brownie" <[email protected]> wrote in
    message
    news:egukl8$9a8$[email protected]..
    >I have a registration page that I would like to go to a
    welcome page when
    > registration is complete. The welcome page will say
    "Welcome (name) your
    > new
    > username and password are (user & pwd)". I have
    tried unsuccessfully
    > using
    > cookies to populate the welcome page. Since the user
    will only see this
    > welcome page one time, is there some other way to do
    this? Can I get the
    > needed fields from my database? BTW - the registration
    page works just
    > fine.
    >

  • How do I transfer Libraries from one computer to the other?

    ok i know this might sound like a dumb question but i have no idea how to do it how do i? i downloaded another library onto this computer but it wouldnt transfer any of my songs so how do i transfer libraries??

    Probably the most straightforward way to get iTunes onto your new computer is to network it with the old one and copy your iTunes folder across. This works fine if you have been using iTunes to completely manage your music and all your songs are in iTunes Music not in different folders. You can also use this method with an external hard drive, you drag the folder from the old computer to the external drive and then from the drive to the new computer. If the songs in your library are not all in the iTunes Music folder you can consolidate them. When you consolidate, any songs in the iTunes Library that are not in the iTunes Music Folder are copied to the Music Folder and the Library is updated to point to those new files. Files already in the iTunes Music Folder have no changes made to them: Copying all your iTunes files to one location - Windows
    Copying the whole folder brings with it the iTunes Music folder and also the iTunes Library (iTunes Library.itl in Windows) database file which holds all the information about your songs (Playlists, Ratings, Play Counts, Last Played, Date Added, etc). You'll get more information including the Folder/File structure in this article: What are the iTunes library files?
    When you copy the iTunes folder make sure you put it into the same location on the new computer. This has to be the exact same place, on a PC this is \Documents and Settings\Username\My Documents\My Music\. When you open iTunes on the new computer it will be the same as on the original one Songs, Playlists, Play Counts, Ratings etc. When I moved iTunes a while ago for my daughter I was also using the same version of iTunes, not sure how important that is but it's probably worth keeping them the same.
    If you have an iPod it can be used as an external drive and you can move the iTunes folder onto it: How to use your iPod to move your music to a new computer

Maybe you are looking for

  • Open VI reference from a static reference

    Hello guys, To open VIs dynamically, instead of hardcoding the VI name in a string constant, I do this as shown below to keep a dependency to my VI, so if someone ever delete the VI from the project, move it, rename it, it will create a broken wire s

  • Photoshop CS5 doesn't launch - CoolType error msg

    Know this has been an issue others have experienced in some way.  We have brand new iMacs running 10.6.8.  All machines created using same image.  Some of them can't run Photoshop CS 5 (or Flash) even as local admin account, yet others work just fine

  • HT2729 Having trouble video recording on my IPOD Touch 32 GB

    Can anyone help me with this problem? My IPOD Touch 32 GB won't video tape.  When I try to do a video tape it pauses. It will take pictures. Thank you. Barry

  • Want to show a "Please Wait" message while processing

    Hi, I'm developing an image-processing tutorial applet where the user selects an image and then sets some parameters before pressing an update button which will run a JPEG compression on the image and show the compressed image. The compression takes

  • How can I add Arabic to Nokia 5800

    I got my phone in the U.S. and it doesn't support Arabic language, please help if anyone knows how to add the language or if there is some sort of software that I can download in order to enable the language on my phone. Thanks