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
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
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)