Solved

How to convert string 02-Jan-80 into another string 19800102

Posted on 2006-11-23
2
211 Views
Last Modified: 2010-05-18
Hi experts

It's me again....
tough day today

how do I convert String 02-Jan-80 in another String with format 19800102.


Thanks
0
Comment
Question by:blarouche
  • 2
2 Comments
 
LVL 86

Accepted Solution

by:
CEHJ earned 50 total points
ID: 18004673
DateFormat df1 = new SimpleDateFormat("dd-MMM-yy");
DateFormat df2 = new SimpleDateFormat("yyyyMMdd");

System.out.println(df2.format(df1.parse("02-Jan-80"));
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 18004767
:-)
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This was posted to the Netbeans forum a Feb, 2010 and I also sent it to Verisign. Who didn't help much in my struggles to get my application signed. ------------------------- Start The idea here is to target your cell phones with the correct…
Are you developing a Java application and want to create Excel Spreadsheets? You have come to the right place, this article will describe how you can create Excel Spreadsheets from a Java Application. For the purposes of this article, I will be u…
Viewers will learn about the different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:

856 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question