title: Spark Scala: DateDiff of two columns by hour or minute
body: <p>I have two timestamp columns in a dataframe that I'd like to get the minute difference of, or alternatively, the hour difference of. Currently I'm able to get the day difference, with rounding, by doing</p>
  
  <pre><code>val df2 = df1.withColumn("time", datediff(df1("ts1"), df1("ts2")))
  </code></pre>
  
  <p>However, when i looked at the doc page
  <a href="https://issues.apache.org/jira/browse/SPARK-8185" rel="noreferrer">https://issues.apache.org/jira/browse/SPARK-8185</a>
  I didn't see any extra parameters to change the unit. Is their a different function I should be using for this?</p>