You are here: Reference > JavaScript > client-side > HTML DOM > properties > fileCreatedDate (document, img)

fileCreatedDate property (document, img)

Browser support:
Returns the date when the file was created.
The fileCreatedDate, fileModifiedDate, lastModified, fileUpdatedDate and fileSize properties provide information about a file in JavaScript. These properties are only supported by Internet Explorer, except for the lastModified property that, which is also supported by Firefox, Opera, Google Chrome and Safari.


You can find the related objects in the Supported by objects section below.
This property is read-only.

Possible values:

String that represents the date. You can use this value in the constructor of the Date object.
Default: this property has no default value.

Example HTML code 1:

This example illustrates the use of the fileCreatedDate property:
    <script type="text/javascript">
        function GetFileInfo () {
            var message = "";
            if (document.fileCreatedDate) {
                message += "The document file was created at: <b>" + document.fileCreatedDate + "</b><br />";
            if (document.fileModifiedDate) {
                message += "The document file was last modified at: <b>" + document.fileModifiedDate + "</b><br />";
            if (document.lastModified) {
                message += "The document file was last modified at: <b>" + document.lastModified + "</b><br />";
            if (document.fileUpdatedDate) {
                message += "The document file was last updated at: <b>" + document.fileUpdatedDate + "</b><br />";
            if (document.fileSize) {
                message += "The size of the document file is: <b>" + document.fileSize + " bytes</b><br />";
            var info = document.getElementById ("info");
            info.innerHTML = message;
<body onload="GetFileInfo ();">
    <div id="info" style="width:500px; overflow:auto; background-color:#e0d0d0;"></div>
Did you find this example helpful? yes no

Supported by objects:

Related pages:

External links:

User Contributed Comments

Post Content

Post Content