fileCreatedDate Property

MS Office 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:
Version data is listed when the mouse hovers over a link, or the link has focus.
document, IMG

Back to topBack to top

Did you find this topic useful? Suggestions for other topics? write us!Internet Link

© 1999 microsoft corporation. all rights reserved. terms of useInternet Link.