File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Java in General and the fly likes Date Time conversion Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Badass: Making Users Awesome this week in the Game Development forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Date Time conversion" Watch "Date Time conversion" New topic

Date Time conversion

gokul maha

Joined: Jun 27, 2006
Posts: 25
I have date and time in below format.

DATE : 061206 (yymmdd)

TIME : 023101 (hhmmss)

How to convert it into 2006-12-06 02:31:01 ?

Is there way for it ?
Paul Sturrock

Joined: Apr 14, 2004
Posts: 10336

Have a look at java.text.SimpleDateFormat.

JavaRanch FAQ HowToAskQuestionsOnJavaRanch
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
subject: Date Time conversion