www.fgks.org   »   [go: up one dir, main page]

Click to Rate and Give Feedback
Properties
 fileCreatedDate Property
fileCreatedDate Property

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.
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
Tags What's this?: Add a tag
Community Content
 
Add Community Content
© 2008 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker
DCSIMG