DatetimeListRemoveRange Method for LCStream
This method removes a range from a datetime list LCStream object.
The stream must be in the LCSTREAMFMT_DATETIME_LIST format.
Defined In
LCStream
Syntax
Call lcStream. DatetimeListRemoveRange (index)
Parameters
Parameter |
Description |
---|---|
index |
Long , in the range 1 to lcStream.Rangecount. The position of the value to remove. |
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 range values and counting them. Once the count reaches index, the range 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)
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.DatetimeListRemoveRange (2)
Print "The new stream is " & datelist.Text
End Sub
Example Output
The new stream is 12/25/1950, 07:00:00 AM, 12/31/1999
12:59:00 PM, 01/01/2000 12:00:00 AM, 06:30:00 AM, 05:00:00 PM - 06:00:00 PM