SetDatetime Method for LCField
This method sets a field value to a supplied LCDatetime value. If the field is not of a datetime data type, Notes® will attempt to convert the supplied value to the data type of the field. If conversion fails, error LCFAIL_INVALID_CONVERT will occur. Datetimes can only be converted to Stream data types.
The data type of the field will not change to date/time because of this operation. It will stay the same type but its value will change.
Defined In
LCField
Syntax
Call thisField.SetDateTime (index, srcDateTime)
Parameters
Parameter |
Description |
---|---|
index |
Long. Index identifying the value that is to be assigned. |
srcDateTime |
LCDatetime. Value to be assigned to the field data value. |
Example
Option Public
Uselsx "*lsxlc"
Sub Initialize
Dim field As New LCField (LCTYPE_TEXT)
Dim clock As New LCDatetime
clock.SetCurrent
Call field.SetDatetime (1, clock)
Print "The field's value is " & field.text(0)
End Sub
Example Output
The field's value is 09/08/1999 05:22:30.86 PM