|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
|
|
#1
|
|||
|
|||
|
($atime, $mtime) = (stat($path))[8,9];
$mtime now contains some huge number of seconds somehow relating to when the file specified by $path was last modified. How can I take $mtime and format it to MONTH DAY, YEAR? Thanks! [This message has been edited by scream (edited July 19, 2000).] |
|
#2
|
|||
|
|||
|
Try using something like localtime(). Chek the man pages for further info.
|
|
#3
|
||||
|
||||
|
Try the following..Modify as per your requirment.. ($sec,$min,$hour,$mday,$mon,$year,$wday) = localtime($mtime); @months = ("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"); $year = $year + 1900; $date = "$months[$mon]- $mday - $year"; print $date; ----------------- ------------------ SR - webshiju.com "The fear of the LORD is the beginning of knowledge..." |
![]() |
| Viewing: Dev Shed Forums > Programming Languages > Perl Programming > timestamps |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|