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 Problem with date formatting Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Make it so: Java DB Connections & Transactions this week in the JDBC forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Problem with date formatting" Watch "Problem with date formatting" New topic

Problem with date formatting

sahana mithra
Ranch Hand

Joined: Oct 26, 2010
Posts: 72
Dear all,
My system reboot time which is like 20111205105400.375199+330 must be formatted like 05/12/2011 10:54:00 AM IST.
Here is what i have tried

Please help me to overcome this.
Thank you all.
John Jai

Joined: May 31, 2011
Posts: 1776
You have to use one format to convert the input String to date and another to show the converted date as desired.

sahana mithra
Ranch Hand

Joined: Oct 26, 2010
Posts: 72
Hi Jai,
Thank you so much for the solution.
I agree. Here's the link:
subject: Problem with date formatting
It's not a secret anymore!