Thread View: borland.public.cppbuilder.nativeapi
2 messages
2 total messages
Started by Boguslaw Fries
Mon, 03 Mar 2003 12:05
File update time
Author: Boguslaw Fries
Date: Mon, 03 Mar 2003 12:05
Date: Mon, 03 Mar 2003 12:05
15 lines
1135 bytes
1135 bytes
Hello,
How to check if file creation/ update was more than 1 day before today
I tried
if( FindFirst( MYFILENAME, faAnyFile, sFileSearch ) != 0 )
{
int DateFile = sFileSearch.Time;
but what to convert it into something readable / comparable ???
}
Best regards
Boguslaw Fries
Re: File update time
Author: Boguslaw Fries
Date: Mon, 03 Mar 2003 12:31
Date: Mon, 03 Mar 2003 12:31
23 lines
1581 bytes
1581 bytes
U�ytkownik "Boguslaw Fries" <B.Fries@luca-online.de> napisa� w wiadomo�ci
news:3e6343fd@newsgroups.borland.com...
> Hello,
> How to check if file creation/ update was more than 1 day before today
>
> I tried
> if( FindFirst( MYFILENAME, faAnyFile, sFileSearch ) != 0 )
> {
> int DateFile = sFileSearch.Time;
>
> but what to convert it into something readable / comparable ???
Sorry, I found it myself:
tDateTime = FileDateToDateTime( sFileSearch.Time );
and later simply compare Strings:
FileDate = tDateTime.DateString( );
CurrentDate = DateToStr( Date( ));
if( FileDate != CurrentDate ) ....
Thanks
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads