Win a copy of Java Concurrency Live Lessons this week in the Threads forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Time stamp format  RSS feed

 
munuswamy senthilkumar
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
how to get the timestamp in the following format yyyy-mm-dd-hh.mm.ss.SSnnnn
 
Jeanne Boyarsky
author & internet detective
Sheriff
Posts: 36463
464
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.)
 
munuswamy senthilkumar
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How to get nano second.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!