| title | datetime_col |
|---|
The datetime_col method creates a column containing date-time values.
Note
This method is commonly used with new_table to create tables.
datetime_col(name: str, data: Sequence[Any]) -> InputColumnThe name of the new column.
A sequence of date-time values. This can be a list, tuple, or other sequence type.
An InputColumn.
The following examples use new_table to create a table with a single column of date-times named DateTimes.
from deephaven.time import to_j_instant
from deephaven import new_table
from deephaven.column import datetime_col
first_time = to_j_instant("2021-07-04T08:00:00 ET")
second_time = to_j_instant("2021-09-06T12:30:00 ET")
third_time = to_j_instant("2021-12-25T21:15:00 ET")
result = new_table([datetime_col("DateTimes", [first_time, second_time, third_time])])