Below I’ve pasted the text from the help topic on lotuscript LastModified property.
I am using it and iot doesn’t seem to work. Here is my code:
days = Cint( Date - docPerson.LastModified)
This is what gets logged:
docPerson.LastModified = 03-09-30 2:37:15 PM
date = 03-10-01
days = 0
I noticed that the date formats are different. Could this be the problem? Do I have to manipulate the modified date for this to work?
Any ideas how I can resolve this?
Thanks in advanced.
Terry
Help topic text
- This script sets the value of the PurgeDate item in a document, based on when the document was last modified. If it was modified 14 or more days ago, it sets the PurgeDate to today. If it was modified between seven and thirteen days ago, it sets the PurgeDate to seven days from today.
Dim doc As NotesDocument
Dim days As Integer
'…set value of doc…
days = Cint( Date - doc.LastModified )
If days > 14 Then
doc.PurgeDate = Date
Else
If days > 7 Then
doc.PurgeDate = Date + 7
End If
End If
Call doc.Save( True, True )