File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Creating a String from DateTime" Watch "Creating a String from DateTime" New topic
Author

Creating a String from DateTime

Steve Dyke
Ranch Hand

Joined: Nov 16, 2004
Posts: 1490
    
    1
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:

Year(4),Month(2),Day(2),Hour(2),Minute(2),Second(2)
20070724010101
Jay Damon
Ranch Hand

Joined: Jul 31, 2001
Posts: 282
Look at:SimpleDateFormat The Javadoc contains patterns that are similar.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Creating a String from DateTime