Skip to main content
Version: Python


Date-time values indicate a specific instant in time and can be specified in Deephaven query strings by using single quotes '.


'YYYY-MM-DDThh:mm:ss.ffffff TZ'

  • YYYY - the year
  • MM - the month
  • DD - the day
  • T - the separator between the date and time
  • hh - the hour of the day
  • mm - the minute of the hour
  • ss - the second of the minute
  • ffffff - the fraction of a second
  • TZ - the time zone


The following example creates a table containing date-times and then filters the table based upon a date-time defined in a query string.

from deephaven.time import to_datetime
from deephaven import new_table
from deephaven.column import datetime_col

first_time = to_datetime("2021-07-04T08:00:00 NY")
second_time = to_datetime("2021-09-06T12:30:00 NY")
third_time = to_datetime("2021-12-25T21:15:00 NY")

source = new_table([
datetime_col("DateTimes", [first_time, second_time, third_time])

result = source.where(filters=["DateTimes = '2021-09-06T12:30:00 NY'"])