4

Is it possiblle to get timestamp format like 'dd-MM-yyyy HH:mm:ss.SSS.xxxxxx.nnnnnnnnn' in java? Here

xxxxxx - microseconds
nnnnnnnnn - Nanoseconds

Anybody can help this?

MADHAIYAN M
  • 2,028
  • 25
  • 22
  • [Refer this](http://stackoverflow.com/questions/8826270/how-to-convert-hhmmss-sss-to-milliseconds) – Deepanshu J bedi Jul 23 '14 at 07:48
  • 1
    No, you cant do that. The only thing you can do is multiply milliseconds by 10^x and convert it unaccurately into other units. You can get nanoseconds using `System.nanoTime()` , but thats strictly for performance measures, like calculating start and end time difference of an event in nanoseconds, and does not provide total nanoseconds elapsed with respect to a fixed time. – Mustafa sabir Jul 23 '14 at 07:51

0 Answers0