This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma 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

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’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link:
subject: Date Problems
jQuery in Action, 3rd edition