File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Beginning Java and the fly likes How to get a exact datatime form a long value ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "How to get a exact datatime form a long value ? " Watch "How to get a exact datatime form a long value ? " New topic
Author

How to get a exact datatime form a long value ?

Steven Zeng
Ranch Hand

Joined: Jan 15, 2002
Posts: 41
Hi ,here is a question from my coding. We all know that class File has a method with the name of lastModified which return a long value representing the time the file was last modified, measured in milliseconds since the epoch (00:00:00 GMT, January 1, 1970).The question is how can i get the exact modified datatime from this value? I want the datatime without windage ,especially at month and year.


SCJP2
Anthony Villanueva
Ranch Hand

Joined: Mar 22, 2002
Posts: 1055
Date(long date)
Steven Zeng
Ranch Hand

Joined: Jan 15, 2002
Posts: 41
Thank you, Anthony,I fogrot to lookup it up in Date doc.A simple question,right?
Anthony Villanueva
Ranch Hand

Joined: Mar 22, 2002
Posts: 1055
You're welcome
 
Consider Paul's rocket mass heater.
 
subject: How to get a exact datatime form a long value ?
 
Similar Threads
Problem while converting datatime to timestamp
How to compare the datetime to find the latest datatime
how to I check when a file was last modified ????
DataTime conversion
File.lastModified() on windows vs linux