title: Mariadb - calculate date difference in hour
body: <p>Here is my initial code : </p>
  
  <pre><code>SELECT order_logs.order_logs_created, DATEDIFF(HOUR ,NOW(),order_logs.order_logs_created) FROM order_logs
  </code></pre>
  
  <p>And I gave an error :</p>
  
  <pre><code>#1582 - Incorrect parameter count in the call to native function 'DATEDIFF'
  </code></pre>
  
  <p>Then , I searched about MariaDB's DATEDIFF and I saw <a href="https://stackoverflow.com/questions/23250555/incorrect-parameter-count-in-the-call-to-native-function-datediff">this</a> , I figured out that I can use DATEDIFF with two parameters so I remove HOUR :</p>
  
  <pre><code>SELECT order_logs.order_logs_created, DATEDIFF(NOW(),order_logs.order_logs_created) FROM order_logs
  </code></pre>
  
  <p>I need time difference in hours , Actually it gives me in days. Any suggestion?</p>