Discussion Locked
0 helpful
5 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
Why lastModified() method of File Class return no of miliseconds since 1st Jan 1970 at 00.00. While no body wants to write a code to convert this into date format? Is it because of limitaion of code.And if I want it to convert it into date format which the best way to do so.
5 replies
by mark.thomson
It's based on a data type called a time_t (the numbber of seconds since 1st Jan 1970) inherited from C/UNIX.
One of the Constructors for the java.util.Date class will accept your value as an argument
by vickydicky
Poster rated this answer
by jay eckles
Perhaps you could use this method:
public Date lastModifiedDate( File f ){
return new Date( f.lastModified() ) ;
}
Good luck.
Jay Eckles
www.jayeckles.com
by vickydicky
Poster rated this answer
by vickydicky
This question was closed by the author
This discussion is closed to new replies.
Trending Web Development posts
Sort by Trending
Discussion Locked
What Makes a Business Website Effective in 2026
2 helpful
10 replies
1 helpful
3 replies
Question
Windows and macOS computers becoming slow or unstable after updates - what should I check first
0 helpful
1 reply
Question Unanswered
Best Way to Make Long WordPress Location Guides Mobile Friendly
0 helpful
0 replies
Discussion
Optimizing WordPress widgets and DOM size
0 helpful
3 replies