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 Problems 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 Problems" Watch "Date Problems" New topic

Date Problems

Abiodun Adisa
Ranch Hand

Joined: Jan 17, 2002
Posts: 495
I am trying to convert this Date Format "Mon May 01 18:00:00 EDT 2006" into"5/01/2006 6:00 PM", Does any one have an Idea
Ramen Chatterjee
Ranch Hand

Joined: Apr 27, 2006
Posts: 62

Check out the Sun internationalisation tutorial, particularly the part for date formatting.

Good luck


Could try harder
Adam Richards
Ranch Hand

Joined: Nov 03, 2005
Posts: 135
Reading between the lines, it sounds like your question is really "how do I output the date value in format xxx?"

You may be confusing the date's value with its string representation, which are two different things. A Date (or practically any object, for that matter), can be represented as a string in an almost infinite number of ways. How you do that is controlled by a formatting class, as the other reply indicates. Hope this clarifies rather than obfuscates things.
I agree. Here's the link:
subject: Date Problems
It's not a secret anymore!