Article View: borland.public.cppbuilder.nativeapi
Article #17741Re: File update time
From: 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
Technical Details
Message-ID:
<3e634a0c$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-06!sn-xit-09!supernews.com!iad-peer.news.verio.net!news.verio.net!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mailReferences:
<3e6343fd@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII X-Google-Thread: 10cc67,75f3d5d0510adcdb X-Google-Attributes: gid10cc67,public X-Google-ArrivalTime: 2003-03-04 13:28:02 PST From: "Boguslaw Fries" <B.Fries@luca-online.de> Newsgroups: borland.public.cppbuilder.nativeapi References: <3e6343fd@newsgroups.borland.com> Subject: Re: File update time Date: Mon, 3 Mar 2003 13:31:43 +0100 Lines: 25 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 NNTP-Posting-Host: 217.82.85.76 Message-ID: <3e634a0c$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1046694412 217.82.85.76 (3 Mar 2003 04:26:52 -0800) Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-06!sn-xit-09!supernews.com!iad-peer.news.verio.net!news.verio.net!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail