Update: Oh, I just noticed: Perl Version: 5.10.1 running on Linux workstation.

You can't get the creation time from the file system because it doesn't exist on Unix. I don't even know if "creation time" is stored in the older .xls format.
======

There are some complications with achieving your goals. Perl has built in file test operators. BUT, these operators only supply information that would be available on a Unix file system. Unix does not have the idea of a "created on" or "Born On" date. Windows does have that concept and you will need to use a Windows specific api to get it.

In Unix you can get the mtime(last modified), atime (last accessed) and ctime (last inode change time). ctime is not creation time.

The easiest way to get mtime: time = -M "filepath";. seefile test operators.

For the Windows creation time, I think Win32::API:File will get you there. Although there may be a better module for this or a command line command that you could run. In this Win32 api, they labeled ctime as "creation time". I would run some tests on Windows to make sure that is really what you are getting.

Summary, Last Modified Time is easy. Creation Time is only available on Windows and is more difficult to get because there is no "standard" Perl function for it.


In reply to Re: Find Created and Last Modified Date of Excel xls file by Marshall
in thread Find Created and Last Modified Date of Excel xls file by gauss76

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.