0

I have a datetime object as follows:

pd.to_datetime('2022-06-01')

I want to append 00:00:00.000 to the object to get 2022-06-01 00:00:00.000 Any ideas how to achieve this? Thanks!

FlyingPickle
  • 1,047
  • 1
  • 9
  • 19

1 Answers1

1

How about this?

pd.to_datetime('2022-06-01').strftime("%Y-%m-%d %H:%M:%S.%f")[:-3]
'2022-06-01 00:00:00.000'
Lazyer
  • 917
  • 1
  • 6
  • 16