Sets a new value for a specific column with the data type DateTime.

Syntax

XIH.SetString(colcaption, value)
XIH.SetString(colcaption, offset, value)
XIH.SetString(colIndex, value)
XIH.SetString(colIndex, offset, value)

Parameters

Parameter

Data type

Description

Sample

colcaption

string

String specifies the columns caption.

"col1"

colIndex

int

Index of a column

1

offset

int

Optionally specifies the row offset. Default is 1

1

value

DateTime

The new value that will replace the old one

30/06/2022 23:00:00

Remarks

ColumnIndex is zero-based.

A statement with an offset returns 'false' after reaching the end of the column due to the offset.

Returns a boolean.

Examples

For this example to work you need an existing column "OldShift" that is filled with DateTimes and an existing column "NewShift" with the data type DateTime that will be filled with the results.

XIH.SetDateTime("NewShift", #OldShift#)

Writes into column "NewShift" the value of column "OldShift".