title: PySpark: Subtract Two Timestamp Columns and Give Back Difference in Minutes (Using F.datediff gives back only whole days)
body: <p>I have the following sample dataframe.  The date_1 and date_2 columns have datatype of timestamp.   </p>
  
  <pre><code>ID  date_1                      date_2                      date_diff
  A   2019-01-09T01:25:00.000Z    2019-01-10T14:00:00.000Z    -1
  B   2019-01-12T02:18:00.000Z    2019-01-12T17:00:00.000Z    0
  </code></pre>
  
  <p>I want to find the different between date_1 and date_2 in <strong>minutes.</strong></p>
  
  <p>When I use the code below, it gives me the date_diff column in whole integer values (days): </p>
  
  <pre><code>df = df.withColumn("date_diff", F.datediff(F.col('date_1'), F.col('date_2')))  
  </code></pre>
  
  <p>But what I want is for date_diff to take into consideration the timestamp and give me minutes back. </p>
  
  <p>How do I do this?  </p>