char *str;
HFILE hFile;
long temp;
int year,month,day,hour,minute,second;
FILETIME *CreationTime=new FILETIME;
FILETIME *LastAccessTime=new FILETIME;
FILETIME *LastWriteTime=new FILETIME;
SYSTEMTIME *STime=new SYSTEMTIME;
str="c:\\abc.txt";
hFile=_lopen(str,OF_READ);
temp=GetFileTime((HANDLE*)hFile,CreationTime,LastAccessTime,LastWriteTime);
FileTimeToSystemTime(CreationTime,STime);
year=STime->wYear;
month=STime->wMonth;
day=STime->wDay;
hour=STime->wHour;
minute=STime->wMinute;
second=STime->wSecond;
Edit1->Text=IntToStr(year)+IntToStr(month)+IntToStr(day)+IntToStr(hour)+IntToStr(minute)+IntToStr(second);
FileTimeToSystemTime(LastAccessTime,STime);
year=STime->wYear;
month=STime->wMonth;
day=STime->wDay;
hour=STime->wHour;
minute=STime->wMinute;
second=STime->wSecond;
Edit2->Text=IntToStr(year)+IntToStr(month)+IntToStr(day)+IntToStr(hour)+IntToStr(minute)+IntToStr(second);
FileTimeToSystemTime(LastWriteTime,STime);
year=STime->wYear;
month=STime->wMonth;
day=STime->wDay;
hour=STime->wHour;
minute=STime->wMinute;
second=STime->wSecond;
Edit3->Text=IntToStr(year)+IntToStr(month)+IntToStr(day)+IntToStr(hour)+IntToStr(minute)+IntToStr(second);
HFILE hFile;
long temp;
int year,month,day,hour,minute,second;
FILETIME *CreationTime=new FILETIME;
FILETIME *LastAccessTime=new FILETIME;
FILETIME *LastWriteTime=new FILETIME;
SYSTEMTIME *STime=new SYSTEMTIME;
str="c:\\abc.txt";
hFile=_lopen(str,OF_READ);
temp=GetFileTime((HANDLE*)hFile,CreationTime,LastAccessTime,LastWriteTime);
FileTimeToSystemTime(CreationTime,STime);
year=STime->wYear;
month=STime->wMonth;
day=STime->wDay;
hour=STime->wHour;
minute=STime->wMinute;
second=STime->wSecond;
Edit1->Text=IntToStr(year)+IntToStr(month)+IntToStr(day)+IntToStr(hour)+IntToStr(minute)+IntToStr(second);
FileTimeToSystemTime(LastAccessTime,STime);
year=STime->wYear;
month=STime->wMonth;
day=STime->wDay;
hour=STime->wHour;
minute=STime->wMinute;
second=STime->wSecond;
Edit2->Text=IntToStr(year)+IntToStr(month)+IntToStr(day)+IntToStr(hour)+IntToStr(minute)+IntToStr(second);
FileTimeToSystemTime(LastWriteTime,STime);
year=STime->wYear;
month=STime->wMonth;
day=STime->wDay;
hour=STime->wHour;
minute=STime->wMinute;
second=STime->wSecond;
Edit3->Text=IntToStr(year)+IntToStr(month)+IntToStr(day)+IntToStr(hour)+IntToStr(minute)+IntToStr(second);