在这里,你可以 but子,看看它如何运作:
Sub Click(Source As Button)
Dim workspace As New NotesUIWorkspace
Dim uidoc As NotesUIDocument
Dim doc As NotesDocument
Dim startDT As New NotesDateTime("")
Dim endDT As New NotesDateTime("")
Dim diff As Long
Set uidoc = workspace.CurrentDocument
Set doc = uidoc.Document
Set startDT = doc.getFirstItem("StartDate").dateTimeValue
Call startDT.SetAnyTime
Set endDT = doc.GetFirstItem("ReturnDate").dateTimeValue
Call endDT.SetAnyTime
diff = startDT.TimeDifference(endDT)
Msgbox Cstr(diff)
End Sub
Here is a table I keep to help me get my brain around the numbers:
<table>
<tr>
<th>startDT</th>
<th>endDT</th>
<th>Result</th>
</tr>
<tr>
<td>June</td>
<td>March</td>
<td>Positive</td>
</tr>
<tr>
<td>June</td>
<td>October</td>
<td>Negative</td>
</tr>
</table>
如果3月份为3月份,你必须补充(即邮政),到6月份,即6月份。 如果6月份还剩下6个,从10月份开始,你必须退席(即消极)。