datetime - python count down to event (in days and hours) -
please can advise on this, i've tried various methods don't seem able work.
i need countdown from
datetime.now()
to
datetime(2011,05,05)
in days hours
you can use
delta = datetime.datetime(2011, 05, 05) - datetime.datetime.now()
to datetime.timedelta
object describing remaining time. number of remaining days delta.days
, remaining hours delta.seconds/3600.
or delta.seconds//3600
.
Comments
Post a Comment