jQuery in Action, 2nd edition
The moose likes Beginning Java and the fly likes Creating a String from DateTime Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of The Software Craftsman this week in the Agile forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Creating a String from DateTime" Watch "Creating a String from DateTime" New topic

Creating a String from DateTime

Steve Dyke
Ranch Hand

Joined: Nov 16, 2004
Posts: 1519
I need to generate a 14 character string from the current DateTime. I will use this as an index for new created records. I need it in the format:

Jay Damon
Ranch Hand

Joined: Jul 31, 2001
Posts: 282
Look at:SimpleDateFormat The Javadoc contains patterns that are similar.
subject: Creating a String from DateTime