Examples: NotesDateRange class
- This example sets the StartDateTime and EndDateTime properties
of a NotesDateRange object, then displays the value of the Text property.
The Text property, at this point, has the value: "08/18/96 01:36:22
PM - 08/19/96 01:36:22 PM."
Dim dateRange As NotesDateRange Dim session As New NotesSession Dim dateTime1 As New NotesDateTime("08/18/96 01:36:22 PM") Dim dateTime2 As New NotesDateTime("08/19/96 01:36:22 PM") Set dateRange = session.CreateDateRange() Set dateRange.StartDateTime = dateTime1 Set dateRange.EndDateTime = dateTime2 Messagebox dateRange.Text
- This example writes a value to the Text property, then displays
the LocalTime property of the StartDateTime and EndDateTime properties
(which are NotesDateTime objects). The LocalTime properties, at this
point, are "08/18/96 01:36:22 PM" and "08/19/96 01:36:22 PM."
Dim dateRange As NotesDateRange Dim session As New NotesSession Set dateRange = session.CreateDateRange() dateRange.Text= _ "08/18/96 01:36:22 PM - 08/19/96 01:36:22 PM" Messagebox dateRange.StartDateTime.LocalTime Messagebox dateRange.EndDateTime.LocalTime
- This example sets a value for a NotesDateRange object, then changes
the NotesDateTime object on which the EndDateTime property is based.
This implicitly changes the EndDateTime property.
Dim dateRange As NotesDateRange Dim session As New NotesSession Dim dateTime1 As New NotesDateTime("Today") Dim dateTime2 As New NotesDateTime("Tomorrow") Set dateRange = session.CreateDateRange() Set dateRange.StartDateTime = dateTime1 Set dateRange.EndDateTime = dateTime2 Messagebox dateRange.Text Call dateTime2.AdjustDay(1) Messagebox dateRange.Text