Discussion Locked

lastModified????

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

This discussion is closed to new replies.