Answer the question
In order to leave comments, you need to log in
How to output only "%H" from TimeField?
in the database table is filled like this - 10:30:00
I need to display separately: hour - 10, min - 30, sec - 00
how can I do this?
in the models file
session_time_start = models.TimeField() # 10:30:00
>>> a = Session.objects.all()[0].session_time_start
>>> a
datetime.time(12, 30)
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question