Türlich
Dim wks As New NotesUIWorkspace
Dim doc As NotesDocument
Dim beginn As NotesItem
Dim hf As Notesitem
Dim beginntime As NotesDateTime
Dim hftime As NotesDateTime
Dim i As Integer
Set doc = wks.CurrentDocument.Document
Set beginn = doc.GetFirstItem("Vertragsbeginn")
Set hf = doc.GetFirstItem("Hauptfälligkeit")
Set beginntime = beginn.DateTimeValue
Set hftime = hf.DateTimeValue
i = (hftime.TimeDifferenceDouble(beginntime))
Messagebox i/86400
If doc.Berechnungsbasis(0) = "Basis 360 Tage" Then
doc.Erstbeitrag = ((i / 86400) * doc.Jahresbeitrag(0)) / 360
Else
doc.Erstbeitrag = ((i/86400) * doc.Jahresbeitrag(0)) / 365
End If