File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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: 13875
    
  10

"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 7 API documentation
Scala Notes - My blog about Scala
Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 13875
    
  10

"benjamin" - Your name is still not according to the naming policy. Please read it carefully and change your name.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: timestamp with microseconds
 
Similar Threads
MicroSeconds
Who called?
How to create a date object which contain current date
Current Timestamp in microseconds
TimeStamp.toString() does not work as expected