This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Java in General and the fly likes Time stamp format Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Time stamp format" Watch "Time stamp format" New topic
Author

Time stamp format

munuswamy senthilkumar
Greenhorn

Joined: Jun 18, 2004
Posts: 2
how to get the timestamp in the following format yyyy-mm-dd-hh.mm.ss.SSnnnn
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 30050
    
149

Munuswamy,
Welcome to javaranch!

Take a look at the SimpleDateFormat class. It lets you customize the format of a date (timestamp is a subclass of date so it can do timestamps too.)


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
munuswamy senthilkumar
Greenhorn

Joined: Jun 18, 2004
Posts: 2
How to get nano second.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Time stamp format
 
Similar Threads
Code for binary file to bitmap file conversion
Help Needed in EL
Why is Refresh neccessary when loading the page?
Mock Exams for the new cert?
How to pass Arraylist values from an actionClass to a JSP page