This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes Java in General and the fly likes timestamp with microseconds Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Java in General
Bookmark "timestamp with microseconds" Watch "timestamp with microseconds" New topic
Author

timestamp with microseconds

benjamin bohl
Greenhorn

Joined: Sep 13, 2007
Posts: 1
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

Joined: Aug 16, 2005
Posts: 14950
    
  26

"trade talk", please check your private messages. You can see them by clicking My Profile.


Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 8 API documentation
Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 14950
    
  26

"benjamin" - Your name is still not according to the naming policy. Please read it carefully and change your name.
 
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
 
subject: timestamp with microseconds
 
It's not a secret anymore!