LOTUSSCRIPT/COM/OLE CLASSES


Examples: Converting between Domino Designer and LotusScript time
This example writes the DateComposed item from a Domino Designer document to the LocalTime property of a NotesDateTime object, then accesses the LSLocalTime property of that object with the Weekday LotusScript function.

Sub Click(Source As Button)
 Dim workspace As New NotesUIWorkspace
 Dim uidoc As NotesUIDocument
 Dim doc As NotesDocument
 Dim dateComposedObj As New NotesDateTime("")
 Set uidoc = workspace.CurrentDocument
 Set doc = uidoc.Document
 dateComposed = doc.DateComposed
 dateComposedObj.LSLocalTime = dateComposed(0)
 thisWeekday = Weekday(dateComposedObj.LocalTime)
 Select Case thisWeekday
 Case 1 : stringWeekday = "Sunday"
 Case 2 : stringWeekday = "Monday"
 Case 3 : stringWeekday = "Tuesday"
 Case 4 : stringWeekday = "Wednesday"
 Case 5 : stringWeekday = "Thursday"
 Case 6 : stringWeekday = "Friday"
 Case 7 : stringWeekday = "Saturday"
 End Select
 Messagebox _
 ("This document was composed on a " & stringWeekday)
End Sub

See Also