LOTUSSCRIPT/COM/OLE CLASSES

Examples: NotesDateTime class
1. This script creates a new NotesDateTime object that represents August 18, 1995 at 1:36:22 PM. 2. This script creates a new NotesDateTime object identical to the one created in the script above.
3. This script creates a new NotesDateTime object that represents today's date and then displays a dialog box; for example, if today is August 21, 1995, the script displays "08/21/95" in a dialog box. The time component of the NotesDateTime object is not set.
4. This script creates a new NotesDateTime object that represents April 16, 1996 at 20:30. The date component is stored as 08:30:00 PM. 5. This script creates two new NotesDateTime objects. The first represents January 15, 1997; the second represents January 15, 2000.
6. This script gets the value of the purgeDate item in a document and places it into a NotesDateTime object. The time zone setting of purgeDate is preserved. For example, if purgeDate has a value of 03/21/96 04:54:33 PM in Eastern Standard Time, the dateTime object represents 03/21/96 04:54:33 PM and its TimeZone property equals 5.
7. This script also gets the value of the purgeDate item in a document, but places it into a variant called value. The LSLocalTime property is then set to value. The time zone setting of purgeDate is not preserved because the LotusScript variant value does not store it. Therefore, the dateTime object might represent 03/21/96 04:54:33, but its TimeZone property defaults to zero.
8. This script sets the Schedule field of the first document in a collection to 09:00 PM. The same value is displayed for both the LocalTime and GMTTime properties. This is because the TimeZone property of the dateTime object defaults to zero when you do not specify both the time and the date in the dateTime parameter.
See Also