Skip to main content
Version: Python

to_j_zdt

to_j_zdt converts a date-time value to a Java ZonedDateTime.

info

In query strings, users should choose the built-in function parseZonedDateTime instead of to_j_zdt. For more information, see:

Syntax

to_j_zdt(dt: Union[None, ZonedDateTime, str, datetime.datetime, numpy.datetime64, pandas.Timestamp]) -> ZonedDateTime

Parameters

ParameterTypeDescription
dtUnion[None, ZonedDateTime, str, datetime.datetime, numpy.datetime64, pandas.Timestamp]

A date-time value to convert to a Java ZonedDateTime.

ZonedDateTime strings should be formatted according to the ISO-8601 standard, which is yyyy-MM-ddThh:mm:ss[.SSSSSSSSS] TZ, where TZ is the time zone offset from UTC; e.g., 2022-01-01T00:00:00 ET.

Returns

Returns a ZonedDateTime representation of the date-time string.

Examples

from deephaven.time import to_j_zdt

zdt = to_j_zdt("1995-03-22T11:11:11.23142 UTC")
print(zdt)