Viewing File Dates : File Upload « Development « JavaScript DHTML

JavaScript DHTML
1. Ajax Layer
2. Data Type
3. Date Time
4. Development
5. Document
6. Dojo toolkit
7. Event
8. Event onMethod
9. Ext JS
10. Form Control
11. GUI Components
12. HTML
13. Javascript Collections
14. Javascript Objects
15. Javascript Properties
16. jQuery
17. Language Basics
18. Mochkit
19. Mootools
20. Node Operation
21. Object Oriented
22. Page Components
23. Rico
24. Scriptaculous
25. Security
26. SmartClient
27. Style Layout
28. Table
29. Utilities
30. Window Browser
31. YUI Library
Java
Java Tutorial
Java Source Code / Java Documentation
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
JavaScript DHTML » Development » File Upload 
Viewing File Dates


<HTML>
<HEAD>
<TITLE>file Created Date and file Modified Date Properties</TITLE>
<SCRIPT LANGUAGE="JavaScript">
function fillInBlanks() {
    var created = document.fileCreatedDate;
    var modified = document.fileModifiedDate;
    document.all.created.innerText = created;
    document.all.modified.innerText = modified;
    
    var createdDate = new Date(created).getTime();
    var today = new Date().getTime();
    var diff = Math.floor((today - createdDate(1000*60*60*24));
    
    document.all.diff.innerText = diff;
    document.all.size.innerText = document.fileSize;
}
</SCRIPT>
</HEAD>
<BODY onLoad="fillInBlanks()">
<H1>fileCreatedDate and fileModifiedDate Properties</H1>
<HR>
<P>This file (<SPAN ID="size">&nbsp;</SPAN> byteswas created 
on <SPAN ID="created">&nbsp;</SPAN> and most
recently modified on <SPAN ID="modified">&nbsp;</SPAN>.</P>
<P>It has been <SPAN ID="diff">&nbsp;</SPAN> days since this file was
created.</P>
</BODY>
</HTML>

           
       
Related examples in the same category
1. File Input Element
2. Methods and Properties of the FileUpload Object
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.