title: Subtracting Date-time objects in Pandas
body: <p>I have two columns in my dataframe with datetime64[ns] values. I would like to subtract the end-date from my start-date and place that value of a new column? How do I do that?</p>
  
  <p>Here is an example of my data:</p>
  
  <p><strong>StartedDate(Column1)</strong></p>
  
  <p>2018-09-02 02:54:39</p>
  
  <p>2018-09-02 15:14:31</p>
  
  <p>2018-09-02 18:04:35</p>
  
  <p>2018-09-02 18:04:35  </p>
  
  <p><strong>EndedDate(column 2)</strong></p>
  
  <p>208-09-02 15:20:15</p>
  
  <p>2018-09-02 18:04:34</p>
  
  <p>2018-09-02 18:11:15</p>
  
  <p>2018-09-02 18:39:34 </p>
  
  <p>In excel it converts the dates in numbers (e.g. 43789,04). I want to do the same with these values and convert them into these kinds of numbers and then subtract them. However, I find it difficult to do that in Python.</p>
  
  <p>The output I am currently getting has the format of (12:25:36) while I want it to be like that (43740.64-43740.12= 0.52)</p>