Click to return to the DHTML, HTML     
fgColor Property     fileModifiedDate Property     DHTML Properties    
Web Workshop  |  DHTML, HTML & CSS

fileCreatedDate Property


Retrieves the date the file was created.

Syntax

HTMLN/A
Scripting[ sDate = ] object.fileCreatedDate

Possible Values

sDateString 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 ]
PlatformVersion
Win16:
Win32:
Mac:
Unix:
WinCE:
document, IMG


Back to topBack to top

Did you find this topic useful? Suggestions for other topics? Write us!

© 1999 Microsoft Corporation. All rights reserved. Terms of use.