DatetimeListInsertValue Method for LCStream

This method inserts a value into a datetime list LCStream object.

The stream must be in the LCSTREAMFMT_DATETIME_LIST format.

Defined In

LCStream

Syntax

Call lcStream. DatetimeListInsertValue (index, datetime)

Parameters

Parameter

Description

index

Long, in the range 1 to lcStream.Valuecount + 1. The index position at which to insert the value.

datetime

LCDatetime. The datetime value to insert.

Example

Option Public
Uselsx "*lsxlc"
Sub Initialize
  Dim datelist As New LCStream (0, 0, LCSTREAMFMT_DATETIME_LIST)
  Dim clock As New LCDatetime
  clock.SetCurrent
  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.DatetimeListInsertValue (3, clock)
  Print "The new stream is " & datelist.Text
End Sub

Example Output

The new stream is 12/25/1950, 07:00:00 AM, 09/08/1998 05:22:23.96 PM, 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, 05/01/1996 - 05/31/1996