Hi ...
How to get the creation date and time of a certain file ???
Thanks anyway !!!!!
Printable View
Hi ...
How to get the creation date and time of a certain file ???
Thanks anyway !!!!!
Anyone ?????? :(
10 minutes!! Geesh :p Microsoft always make undecipherable function names like FileDateTime() :)
Bit tetchy today Mr Laidlaw?
Moi? :eek: I am never tetchy (well except with those BASTARDS that try to take 10 items thru the 8 items only aisle) And in the words of one Jimbo Brown... "this thread should be in Chit Chat" :D
Actually, the FileDateTime() function does NOT return the CREATED date of the the item.... it returns the modified date instead. If Mimo really wants the Created date, you will need to use other functions. But if all you want is the date and time that is shown in Windows Explorer, then the Modified Date is the one you want, and FileDateTime is a good one to use.
For example:
[Highlight=VB]
Dim FSO, FSOf
Set FSO = CreateObject("Scripting.FileSystemObject")
thisFolder = "C:\Windows"
Set FSOf = FSO.GetFolder(thisFolder)
MsgBox FSOf.DateCreated
MsgBox FSOf.DateLastModified
[\vbcode]
VB Code:
Private Sub Command1_Click() Dim MyDateTime As Variant MyDateTime = FileDateTime("c:\MyFile.Exe") MsgBox MyDateTime End Sub
10x beachbum, but this function returns the modification date NOT the creation date :)
10x anyway !!!
Take a look at the code here...
http://www.geocities.com/SiliconVall...45/vb/025.html