Bit


Hi,

Concerning a dbf file details.

Can VFP datetime() provide the

last modified, create, last acces "date-time"

details to developer

Thanks in adv,

BIT




Re: How do VFP get the last modified date-time information?

Budoi


If you're trying to get the last date/time a dbf was modified from within a VFP application, you can use FDATE() and FTIME().






Re: How do VFP get the last modified date-time information?

Naomi Nosonovsky

Are you talking about each record in the DBF file or about a a file itself

If the later, then one approach can be:

Code Snippet
oFys = CreateObject("Scripting.FileSystemObject")
oFile = oFys.GetFile(cFileName)
ltCreated = oFile.DateCreated
ltAccessed = oFile.DateLastAccessed
ltModified = oFile.DateLastModified

For the record's creation/modification there are several approaches. You can use Audit trials or you can simply add several extra fields to your table such as tDate_Created cUser_Created tLast_Modified cLast_Updated_User.

Then you would use default values to update creation date/user and Table rule to update Modified date/user.

Let me know if you need more info regarding table rule or Audit trial. I personally use Table rule and keep extra fields inside the table.