0

I've incorporated a datetime module that gives the output of the current time, but it does not include AM/PM in the output. Specifically I am using the "Now" and "strftime" features to give the exact time in the output. I am wondering what else I might need to add in order for Am or PM to show but I could not find anything to figure it out. Any help is appreciated.

import datetime
my_datetime = datetime.datetime.now()
print("Checkout at:", my_datetime.strftime("%Y-%m-%d %H:%M:%S")) 

For reference, the output right now looks like this: "Checkout at: 2022-07-28 01:12:07"

Lr2014
  • 1
  • 1

0 Answers0