Please can someone advise on this, I've tried various methods but don't seem to be able to get it to work.
I just need a countdown from
datetime.now()
to
datetime(2011,05,05)
in days hours
You can use
delta = datetime.datetime(2011, 5, 5) - datetime.datetime.now()
to get a datetime.timedelta
object describing the remaining time. The number of remaining days is delta.days
, the remaining hours delta.seconds/3600.
or delta.seconds//3600
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With