• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 222
  • Last Modified:

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

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
blarouche
Asked:
blarouche
  • 2
1 Solution
 
CEHJCommented:
DateFormat df1 = new SimpleDateFormat("dd-MMM-yy");
DateFormat df2 = new SimpleDateFormat("yyyyMMdd");

System.out.println(df2.format(df1.parse("02-Jan-80"));
0
 
CEHJCommented:
:-)
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Ruby Fundamentals

This course will introduce you to Ruby, as well as teach you about classes, methods, variables, data structures, loops, enumerable methods, and finishing touches.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now