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

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -