milvus-logo
LFAI
< Docs

hybridts_to_datetime()

This operation converts a hybrid timestamp to a Python’s datetime object.

Request Syntax

hybridts_to_datetime(
    hybridts: int,
    tz: datetime.timezone | None,
)

PARAMETERS:

  • hybridts (int) -

    [REQUIRED]

    A hybrid timestamp.

  • tz (datetime.timezone) -

    A datetime.timezone object.

RETURNS: A datetime.datetime object.

EXCEPTIONS:

N/A

EXAMPLE:

import time
from pymilvus import utility

epoch_t = time.time()

ts = utility.mkts_from_unixtime(epoch_t)

d = utility.hybridts_to_datetime(ts)

Related operations

The following operations are related to hybridts_to_datetime():

Try Managed Milvus for Free

Zilliz Cloud is hassle-free, powered by Milvus and 10x faster.

Get Started
Feedback

Was this page helpful?