function GetCreationFileDate(FileName: String): TDate; var FileData: WIN32_FILE_ATTRIBUTE_DATA; SystemTime: TSYSTEMTIME; begin GetFileAttributesEx(PCHAR(FileName), GetFileExInfoStandard, @FileData); FileTimeToSystemTime(FileData.ftCreationTime, SystemTime); Result:= EncodeDate(SystemTime.wYear, SystemTime.wMonth, SystemTime.wDay); end;
O en C/C++:
TDate GetCreationFileDate(char* FileName) { WIN32_FILE_ATTRIBUTE_DATA FileData; SYSTEMTIME SystemTime; GetFileAttributesEx(FileName, GetFileExInfoStandard, &FileData); FileTimeToSystemTime(&FileData.ftCreationTime, &SystemTime); return EncodeDate(SystemTime.wYear, SystemTime.wMonth, SystemTime.wDay); }
Saludos.
PD: Edito para colocar prefijo [MULTILENGUAJE]