fileCreatedDate property

Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.
This topic has not yet been rated - Rate this topic

Retrieves the date the file was created.

Syntax

JavaScript

p = object.fileCreatedDate

Property values

Type: String

the date the file was created. For example, Monday, December 08, 1997.

Examples

This example implements the fileCreatedDate property to count the number of days since the document was created.


<script type="text/javascript">
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>

See also

document
img

 

 

Send comments about this topic to Microsoft

Build date: 11/28/2012

Did you find this helpful?
(1500 characters remaining)

Community Additions

© 2013 Microsoft. All rights reserved.