> -----Original Message-----
> From: Alex Harris [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, January 08, 2002 1:17 PM
> To: [EMAIL PROTECTED]
> Subject: timestamp without the time
> 
> 
> 
> 
> How do I get the mm dd yyyy a file was created WITHOUT the time?

Note that you cannot strictly get a creation date; the closest
is the file's last modification date (mtime).

The stat() function will give you (among other things) the
mtime in epoch seconds.

Use localtime() (or gmtime()) to convert that into separatate
date/time elements.

You can use the returns from localtime or gmtime directly or
you can run them through something like POSIX::strftime to get
a formatted string with month, day, and year.

   perldoc -f stat
   perldoc -f localtime
   perldoc POSIX (search for strftime)

n.b. be sure to read the docs for localtime carefully, especially
if you won't be using strftime.

HTH

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to