Web Development
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
1 helpful
8 replies
0 helpful
0 replies
Question
PDF vs HTML
0 helpful
1 reply
0 helpful
1 reply
0 helpful
1 reply