convert_datetime#

2026-03-11

20 min read time

Applies to Linux

pylibhipdf.strings.convert.convert_datetime.from_timestamps(Column timestamps, unicode format, Column input_strings_names, Stream stream=None) Column#

Returns a new strings column converting a timestamp column into strings using the provided format pattern.

For details, see cpp:cudf::strings::from_timestamps.

Parameters#

timestampsColumn

Timestamp values to convert

formatstr

The string specifying output format.

input_strings_namesColumn

The string names to use for weekdays (“%a”, “%A”) and months (“%b”, “%B”).

streamStream | None

CUDA stream on which to perform the operation.

Returns#

Column

New strings column with formatted timestamps.

pylibhipdf.strings.convert.convert_datetime.is_timestamp(Column input, unicode format, Stream stream=None) Column#

Verifies the given strings column can be parsed to timestamps using the provided format pattern.

For details, see cpp:cudf::strings::is_timestamp.

Parameters#

inputColumn

Strings instance for this operation.

formatstr

String specifying the timestamp format in strings.

streamStream | None

CUDA stream on which to perform the operation.

Returns#

Column

New bool column.

pylibhipdf.strings.convert.convert_datetime.to_timestamps(Column input, DataType timestamp_type, unicode format, Stream stream=None) Column#

Returns a new timestamp column converting a strings column into timestamps using the provided format pattern.

For details, see cpp:cudf::strings::to_timestamps.

Parameters#

inputColumn

Strings instance for this operation.

timestamp_typeDataType

The timestamp type used for creating the output column.

formatstr

String specifying the timestamp format in strings.

streamStream | None

CUDA stream on which to perform the operation.

Returns#

Column

New datetime column