Function GetServerTime as variant Dim ses As New NotesSession Dim db As notesDatabase Dim doc As notesDocument Dim dt As Variant Set db = ses.currentDatabase Set doc = New NotesDocument(db) dt = doc.created Call doc.remove(True) GetServerTime = dt End function
I would have used this expression:
Evaluate({@Now([SERVERTIME]; "}
& db.server & {")})
But your way is also good. You don't need the call to doc.Remove. Since you never saved the document, just let the doc variable fall out of scope and there will not be a document created.
Do you have comments on this Ask the Expert question and response? Let us know.
This was first published in September 2004