This week's book giveaway is in the OCAJP 8 forum.
We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line!
See this thread for details.
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

Win a copy of OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
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!