[Tutor] Compare hours

Bob Gailer bgailer at alum.rpi.edu
Fri May 13 00:19:38 CEST 2005


At 03:01 PM 5/12/2005, Alberto Troiano wrote:

>Hey everyone
>
>I have a question. I need to compare two dates and times but it has to be
>quick. (With quick I mean that the algorythm has to be simple in efficient
>
>Here is the deal:
>
>day="thursday"
>hour1="15:30"
>hour2="16:30"
>
>all of the above are strings
>I have to get the system date and time and check if they are between the
>strings and check that days are the same
>
>Can anyone send me an explained code cause I don't know how to work with
>dates and times in Python (Never needed it until now)

Take a look at the time module.

Bob Gailer
mailto:bgailer at alum.rpi.edu
510 558 3275 home
720 938 2625 cell  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/tutor/attachments/20050512/d6b50c26/attachment.html


More information about the Tutor mailing list