DatetimeListGetValue Method for LCStream
This method retrieves a datetime value from a specified place in a DateTimeList LCStream object.
The stream must be in the LCSTREAMFMT_DATETIME_LIST format.
Defined In
LCStream
Syntax
Call lcStream. DatetimeListGetValue (index, datetime)
Parameters
Parameter |
Description |
---|---|
index |
Long, in the range 1 to lcStream.Valuecount. Index position of the datetime value to retrieve. |
datetime |
LCDatetime. The datetime value. |
Usage Notes®
Datetime list streams can contain a mixture of single datetime values and datetime ranges (as shown in the example).
This method scans the list starting with the first element, searching for date-time values and counting them. Once the count reaches index, the date-time value at that position is returned. If the list contains a mixture, this might not be the indexth value in the list.
Example
Option Public
Uselsx "*lsxlc"
Sub Initialize
Dim datelist As New LCStream (0, 0, LCSTREAMFMT_DATETIME_LIST)
Dim num As New LCDatetime
datelist.Text = "12/25/50,7:00AM,5:00PM - 6:00PM,12/31/99 12:59PM," & _
"1/1/2000 12:00AM,6:30AM,5/1/96 - 5/31/96"
datelist.Text = "12/25/50,7:00AM,12/31/99 12:59PM,1/1/2000 12:00AM," & _
"5:00PM - 6:00PM,6:30AM,5/1/96 - 5/31/96"
Call datelist.DatetimeListgetValue (3, num)
Print "The new 3rd datetime is " & num.Text
End Sub
Example Output
The new 3rd datetime is 12/31/1999 12:59:00 PM.