I
I
Ilya Korol2020-04-14 13:31:14
Django
Ilya Korol, 2020-04-14 13:31:14

How to get time difference (DateTimeField, datetime.now())?

There is a model which has a field DateTimeField
It is necessary to find a difference between datetime.now and time in this field.
How to do it?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dr. Bacon, 2020-04-14
@welcome32

https://docs.djangoproject.com/en/3.0/topics/i18n/... and read about the difference between naive and aware https://docs.djangoproject.com/en/3.0/topics/i18n/...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question