title: Converting Time Output to a Float Variable (Python)
body: <pre><code>from Tkinter import *
  from datetime import datetime
  from datetime import timedelta
  import math
  
  rate1 = str(35.34) 
  amp = 2.40
  pmp = 2.50
  
  
  
  signOnSun1 = raw_input("What time did you sign on Sunday: ");
  signOffSun1 = raw_input("What time did you sign off Sunday: ");
  
  if (signOnSun1 &lt; 0600):
      rate1 = rate1 + amp
  elif (signOnSun1 &gt; 1100):
      rate1 = rate1 + pmp
  elif (signOffSun1 &gt; 1800):
      rate1 = rate1 + pmp
  else:
      rate1 = 35.34
  
  FMT = '%H%M'    
  timeWorkedSun1 =  ( (datetime.strptime(signOffSun1, FMT)) -  (datetime.strptime   (signOnSun1, FMT)))
  </code></pre>
  
  <p><strong>* I want to convert timeWorkedSun1 to a float so i can multiply it with rate1 but it seems to be the bane of my life. Any ideas?*</strong></p>