How do I get the datetime object of today's 5pm in Python? -


I want to create a countdown app that will count up to 5 o'clock today. How do I do this with data-object? In short, I just want to get Unix time at 5 o'clock.

I saw the doctor, but I feel a bit lost. Thanks in advance for any help!

You can combine one with:

  Five minutes = Datetime.datetime.combine (datetime.date.today (), datetime.time (17, 0))  

Creates a new date time example and Time from the example given

Demo:

  & gt; & Gt; & Gt; Import Date Time & gt; & Gt; & Gt; Datetime.datetime.combine (... datetime.date.today (), ... datetime.time (17, 0)) datetime.datetime (2014, 7, 27, 17, 0)  

Comments

Popular posts from this blog

java - org.apache.http.ProtocolException: Target host is not specified -

java - Gradle dependencies: compile project by relative path -

ruby on rails - Object doesn't support #inspect when used with .include -