Skip to main content

dateTimeCol

The dateTimeCol method creates a column containing date-time values.

note

This method is commonly used with newTable to create tables.

Syntax

dateTimeCol(columnName, values...)

Parameters

ParameterTypeDescription
columnNameString

The name of the new column.

valuesDBDateTime...

The column values.

Returns

A ColumnHolder.

Example

The following examples use newTable to create a table with a single column of date-times named DateTimes.

from deephaven.DBTimeUtils import convertDateTime
from deephaven.TableTools import newTable, dateTimeCol

firstTime = convertDateTime("2021-07-04T08:00:00 NY")
secondTime = convertDateTime("2021-09-06T12:30:00 NY")
thirdTime = convertDateTime("2021-12-25T21:15:00 NY")

result = newTable(
dateTimeCol("DateTimes", firstTime, secondTime, thirdTime)
)