title: Convert columns to datetime
body: <p>I am writing a csv file. Both row[3] and row[4] are date columns in my original csv file. The row[3] and row[4] are showing floats. In the csv file both of them up as integers but when I run the Python code it shows an error highlighting the decimal.</p>
  
  <pre><code>import csv
  import xlrd
  import time
  import datetime
  
  workbook = xlrd.open_workbook('T:/SUNDAY REPORT 12.30.16.xlsm')
  for sheet in workbook.sheets():
  with open('{}.csv'.format(sheet.name), 'wb') as f:
      writer = csv.writer(f)
      writer.writerows(sheet.row_values(row) for row in range(sheet.nrows))
  
  print "CSV converted"
  
  time.sleep(5)
  
  def xldate_to_datetime(xldate):
      tempDate = datetime.datetime(1900, 1, 1)
      deltaDays = datetime.timedelta(days=float(xldate)-2)
      TheTime = (tempDate + deltaDays )
      return TheTime.strftime("%m/%d/%Y")
  
  with open("InfoCenterTracker.csv","rb") as source:
      rdr= csv.reader( source )
      with open("result.csv","wb") as result:
          wtr= csv.writer( result )
          next(rdr, None) # skip the headers 
          for r in rdr:
               r[3] = xlrd.xldate.xldate_as_datetime(float(r[3]), workbook.datemode)
               r[4] = xlrd.xldate.xldate_as_datetime(float(r[4]), workbook.datemode)                 if r[1] == "": 
                   pass
               else:
                   wtr.writerow(r[1:19])
  
          print "Columns converted to datetime"
  </code></pre>
  
  <p>Error:</p>
  
  <pre><code>r[3] = xlrd.xldate.xldate_as_datetime(float(r[3]), workbook.datemode)
  ValueError: could not convert string to float: 
  </code></pre>
  
  <p>Values in CSV:</p>
  
  <pre><code> Week(Row[3]):    Date(row[4]):
    42735.0         42730.0
    42735.0         42730.0
    42735.0         42731.0
    42735.0         42731.0
  </code></pre>