Retrieves the date the file was created.
Syntax
HTML N/A Scripting [ sDate = ] object.fileCreatedDate
Possible Values
sDate String that specifies the date the file was created (for example, Monday, December 08, 1997). The property is read-only with no default value.
Example
This example implements the fileCreatedDate property to count the number of days since the document was created.
Sample Code
<SCRIPT> window.onload=fnInit; function fnInit(){ // Date document was created var oCreated=new Date(document.fileCreatedDate); // Today's Date var oToday=new Date(); var iSeconds=1000; var iMinutes=60; var iHours=24; // Divisor to convert milliseconds into days var iDays=iSeconds * iMinutes * iHours; var iDaysBetween=(oToday.getTime() - oCreated.getTime()) / iDays; alert("Created: " + oCreated + "\nDays since created: " + iDaysBetween ); } </SCRIPT>
Applies To
document, IMG