1

I saved the datetime in my model and now

I have this ---> Feb. 1, 2020, 10:11 p.m.

How can I reach this? ---> 10:11 p.m

Ali Rn
  • 1,114
  • 8
  • 19

1 Answers1

1

You can call the .time() method [python-doc] to retrieve the time object:

>>> from datetime import datetime
>>> datetime(1958, 3, 25, 12, 34).time()
datetime.time(12, 34)
Willem Van Onsem
  • 443,496
  • 30
  • 428
  • 555