Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Last Update

Status
Not open for further replies.

audiopro

Programmer
Apr 1, 2004
3,165
GB
I have an app which displays the 'last updated' date in a text box which I edit each time I update it. Is there a way to automatically display the files 'last modified' date in a text box?

Keith
 
Use the ADIR function, passing the filename of the current table:
Code:
ADIR(laFiles,DBF())

laFiles(1,3) will contain the last modified date (as a date)
laFiles(1,4) will contain the last modified time (as a string)
 
Keith,

Apart from A, H, R, S and D (that is, archive, hidden, read-only, system and directory), there are attributes for compressed, encrypted, volume label, indexed, and possibly others.

Sorry I don't know which specific letters apply to those in VFP, but it should be possible to figure it out with a bit of trial and error.

Mike


__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro tips, advice, training, consultancy
Custom software for your business
 
r0ger,

You mentioned LUPDATE() and FDATE().

FDATE() is a good choice for EXE files (which I assume is what Keith wants).

LUPDATE() wouldn't work in this case, because it only applies to tables (DBFs) -- and only if they are open. I also vaguely remember a problem with it in VFP 6.0. Perhaps is wasn't Y2K-compliant, or something like that.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro tips, advice, training, consultancy
Custom software for your business
 
Hi AudioProp,

If you would like to see the lastupdated date or datetime of the application, your best bet is to make use of a projecthook.vcx.
If you would like to see the lastupdated date or datetime of a dbf, your best bet is to make use of lupdate().
There is/was a problem with not being 2YK compliant, but that is not oportune anymore to my opinion.
Regards,
Jockey2
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top