This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Date Problems

 
Abiodun Adisa
Ranch Hand
Posts: 495
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
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
Posts: 62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

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

Good luck

Ramen
 
Adam Richards
Ranch Hand
Posts: 135
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic