title: TypeError: unsupported operand type(s) for -: 'datetime.datetime' and 'datetime.time'
body: <pre><code>import pandas as pd
  import datetime
  
  
  df = pd.read_excel('c:/users/user/documents/finance deck coils data.xlsx')
  df = df[['Coil Number','Amnt Left'] ]
  
  
  df2 = pd.read_excel('c:/users/user/documents/Deck Coils Data.xlsx')
  df3 = pd.merge(df, df2, how='right', on='Coil Number')
  
  writer = pd.ExcelWriter('c:/users/user/documents/test.xlsx')
  df3.to_excel(writer, sheet_name = 'Original', index=False)
  df3.loc[df3['Recieved Date'].isnull()].to_excel(writer, sheet_name= 'Zero Fifo', index=False)
  df3.loc[(datetime.datetime.now() - df3['Recieved Date']) &lt;= datetime.timedelta(180)].to_excel(writer, sheet_name= 'Under 6 Months', index=False)
  df3.loc[((datetime.datetime.now() - df3['Recieved Date']) &gt;= datetime.timedelta(181)) &amp; ((datetime.datetime.now() - df3['Recieved Date']) &lt;= datetime.timedelta(365))].to_excel(writer, sheet_name= '6 to 12 Months', index=False)
  df3.loc[((datetime.datetime.now() - df3['Recieved Date']) &gt;= datetime.timedelta(366)) &amp; ((datetime.datetime.now() - df3['Recieved Date']) &lt;= datetime.timedelta(730))].to_excel(writer, sheet_name= '12 to 24 Months', index=False)
  df3.loc[(datetime.datetime.now() - df3['Recieved Date']) &gt;= datetime.timedelta(731)].to_excel(writer, sheet_name= 'Over 24 Months', index=False)
  writer.save()
  </code></pre>
  
  <p>I am getting an error on this line:</p>
  
  <pre><code>df3.loc[(datetime.datetime.now() - df3['Recieved Date']) &lt;= datetime.timedelta(180)].to_excel(writer, sheet_name= 'Under 6 Months', index=False)
  </code></pre>
  
  <p>df3['Recieved Date'] data type is object. I do not know if I need to convert it to date time. How would I do that? The date format is as follows:</p>
  
  <p>2017-06-22 00:00:00</p>