fileCreatedDate Property
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
[ Object Name ] Platform Version Win16: Win32: Mac: Unix: WinCE: Version data is listed when the mouse hovers over a link, or the link has focus. document, IMG
Did you find this topic useful? Suggestions for other topics? write us!
© 1999 microsoft corporation. all rights reserved. terms of use.