Hallo,
Weiß jemand wie ich das Datum auslesen und formatieren kann?
ja, aber nicht erschrecken. 
Option Explicit
Private Type FILETIME
dwLowDateTime As Long
dwHighDateTime As Long
End Type
Private Type SHFILEOPSTRUCT
hWnd As Long
wFunc As Long
pFrom As String
pTo As String
fFlags As Integer
fAborted As Boolean
hNameMaps As Long
sProgress As String
End Type
Private Type SYSTEMTIME
wYear As Integer
wMonth As Integer
wDayOfWeek As Integer
wDay As Integer
wHour As Integer
wMinute As Integer
wSecond As Integer
wMilliseconds As Integer
End Type
Private Const GENERIC\_WRITE = &H40000000
Private Const OPEN\_EXISTING = 3
Private Const FILE\_SHARE\_READ = &H1
Private Const FILE\_SHARE\_WRITE = &H2
Private Const FO\_DELETE = &H3
Private Declare Function CreateFile Lib "kernel32" \_
Alias "CreateFileA" (ByVal lpFileName As String, \_
ByVal dwDesiredAccess As Long, ByVal dwShareMode As Long, \_
lpSecurityAttributes As Long, ByVal dwCreationDisposition As Long, \_
ByVal dwFlagsAndAttributes As Long, ByVal hTemplateFile As Long) As Long
Private Declare Function GetFileTime Lib "kernel32" \_
(ByVal hFile As Long, lpCreationTime As FILETIME, \_
lpLastAccessTime As FILETIME, lpLastWriteTime As FILETIME) As Long
Private Declare Function FileTimeToSystemTime Lib "kernel32" \_
(lpFileTime As FILETIME, lpSystemTime As SYSTEMTIME) As Long
Private Declare Function FileTimeToLocalFileTime Lib "kernel32" \_
(lpFileTime As FILETIME, lpLocalFileTime As FILETIME) As Long
Private Declare Function CloseHandle Lib "kernel32" \_
(ByVal hObject As Long) As Long
Private Sub Command1\_Click()
Dim lngHandle As Long, SHDirOp As SHFILEOPSTRUCT, lngLong As Long
Dim Ft1 As FILETIME, Ft2 As FILETIME, Ft3 As FILETIME, FtC As FILETIME, SysTime As SYSTEMTIME
lngHandle = CreateFile("C:\Test.txt", GENERIC\_WRITE, FILE\_SHARE\_READ Or FILE\_SHARE\_WRITE, ByVal 0&, OPEN\_EXISTING, 0, 0)
GetFileTime lngHandle, Ft1, Ft2, Ft3
FileTimeToLocalFileTime Ft1, FtC
FileTimeToSystemTime FtC, SysTime
MsgBox "Datei erstellt am: " + CStr(SysTime.wDay) + "." + CStr(SysTime.wMonth) + "." + CStr(SysTime.wYear)
FileTimeToLocalFileTime Ft2, FtC
FileTimeToSystemTime FtC, SysTime
MsgBox "Letzter Zugriff am: " + CStr(SysTime.wDay) + "." + CStr(SysTime.wMonth) + "." + CStr(SysTime.wYear)
FileTimeToLocalFileTime Ft3, FtC
FileTimeToSystemTime FtC, SysTime
MsgBox "Letzter Schreibvorgang am: " + CStr(SysTime.wDay) + "." + CStr(SysTime.wMonth) + "." + CStr(SysTime.wYear)
CloseHandle lngHandle
End Sub
Gruß, Rainer