LOTUSSCRIPT LANGUAGE
You use Variant variables to hold and manipulate date/time values, which you can produce by calling one or another of the following functions:
You can use the DataType or TypeName functions to determine if a Variant variable holds a date or date/time value. If it does, DataType returns a value of 7, and TypeName returns DATE.
The following examples illustrate the various ways you can derive date and date/time values, how you can assign them to Variant variables, and some of the operations you can then perform on them, such as calculating a time span or determining the day of the week on which a given date will fall.
Suppose that today is October 26, 1994, the time is 7:49:23 AM, and you declare the following variables:
Dim theInstantV As Variant Dim theDateV As Variant Dim theDateValV As Variant Dim myDate As String
This example gets the current date and time by calling the function Now and then assigns the result to a Variant variable, the InstantV:
Note Various products have different interpretations of two-digit years. Notes, for instance, would write the same value as Oct-18-2014.
This example determines which day of the week a particular day falls on \ Sunday is 1.
Print CDat(.0) 'Prints "12:00:00 AM"
Print CDat(0.0) 'Prints "12:00:00 AM"
Print CDat(0.1) 'Prints "2:24:00 AM"
Print CDat(2.0) 'Prints "1/1/1900"
Print CDat(123456.0) 'Prints "1/3/2238"