pandas.Timestamp.to_datetime64

Timestamp.to_datetime64()

Return a numpy.datetime64 object with same precision.

Examples

>>> ts = pd.Timestamp(year=2023, month=1, day=1,
...                   hour=10, second=15)
>>> ts
Timestamp('2023-01-01 10:00:15')
>>> ts.to_datetime64()
numpy.datetime64('2023-01-01T10:00:15.000000')

© 2008–2011, AQR Capital Management, LLC, Lambda Foundry, Inc. and PyData Development Team
© 2011–2025, Open source contributors
Licensed under the 3-clause BSD License.
https://pandas.pydata.org/pandas-docs/version/2.3.0/reference/api/pandas.Timestamp.to_datetime64.html