KNOWLEDGE BASE
Log In    |    Knowledge Base    |    4D Home
Tech Tip: Checking when a document was last modified
PRODUCT: 4D | VERSION: 2004.4 | PLATFORM: Mac & Win
Published On: August 14, 2006

Using the Get Document Properties command, you can check when a document was last modified. You can retrieve the modification date and time of a document. With this information, you can for instance, verify how many days have passed since the file was last modified, as shown by the code below:

C_TEXT($1;myDocument)
C_LONGINT(daysNotModified)
myDocument:=$1
GET DOCUMENT PROPERTIES(myDocument;mLocked;minvisible;created_on;created_at;modified_on;modified_at)
daysNotModified:=Current date-Modified_on
ALERT(myDocument+" has not been modified for "+String(daysNotModified)+" days")