• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

timestamp with microseconds

 
benjamin bohl
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
want the TimeStamp object to be created with the current day's TimeStamp along with the microseconds. Is there a way to do that.
i was trying to create the TimeStamp like this:-
new TimeStamp(new Date().getTime());
This doesn't return me the microseconds.
If i use the System.nanoTime(). It gives the value comparing from the year 1970's . Can i get the exact milliseconds for the current time.
 
Jesper de Jong
Java Cowboy
Saloon Keeper
Posts: 15216
36
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"trade talk", please check your private messages. You can see them by clicking My Profile.
 
Jesper de Jong
Java Cowboy
Saloon Keeper
Posts: 15216
36
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"benjamin" - Your name is still not according to the naming policy. Please read it carefully and change your name.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic