Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Time stamp format

 
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
Marshal
Posts: 34178
340
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