All Tech Tips

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.onload=fnInit;
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


Copyright © 2006 alltechtips.com. All rights reserved.

This website and the materials and information you find on this website are provided "as is", without warranty of any kind, either express or implied, including without limitation any warranty for information, services, or products provided through or in connection with the service and any implied warranties of merchantability, fitness for a particular purpose, expectation of privacy or non-infringement.