fileCreatedDate Property

Internet Development Index

Retrieves the date the file was created.

Syntax

HTMLN/A
Scripting[ sDate = ] object.fileCreatedDate

Possible Values

sDateString that receives the date the file was created. For example, Monday, December 08, 1997.

The property is read-only. The property has no default value.

Example

This example implements the fileCreatedDate property to count the number of days since the document was created.

<SCRIPT>
window.onload=fnInit;
function fnInit(){
// Date document was created
var oCreated=new Date(document.fileCreatedDate);
// Today's Date
var oToday=new Date();
//There are 86400000 milliseconds in a day
var iMilliSeconds=86400000;
var iDaysBetween=(oToday.getTime() - oCreated.getTime()) / iMilliSeconds;
alert("Created: " + oCreated + "\nDays since created: " +
parseInt(iDaysBetween));
}
</SCRIPT>

Standards Information

There is no public standard that applies to this property.

Applies To

document, IMG