Skip to main content
Version: Java (Groovy)

dateTimeCol

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

note

This method is commonly used with newTable to create tables.

Syntax

dateTimeCol(name, data...)

Parameters

ParameterTypeDescription
nameString

The name of the new column.

dataDateTime...

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.

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)
)