permaculture playing cards
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
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
I agree. Here's the link:
subject: Date Time conversion
It's not a secret anymore!