Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

FileAtTime

Status
Not open for further replies.

youradds

Programmer
Jun 27, 2001
817
GB
Hi. I'm currently using;

$dump1modified = fileatime("/home/ace-host.com/public_html/dump/adult.dump.sql");

to get the modified time of a file. However, it appears as a Unix timestamp. How do i format it to a more readable text?

Any help is appreciated :)

Thanks

Andy
 
Use the timestamp as a second argument to the date function, for example
$dump1modified = date("Y-m-d h:i", fileatime("/home/ace-host.com/public_html/dump/adult.dump.sql"));
would format the timestamp as yyyy-mm-dd hh-mm.
More info is available at //Daniel
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top