sql server 2008 - Difference between two (2) dates/times. Returns negative values -


i want minute difference between 2 dates/times

my query is

select datediff(minute,'2017-06-06 16:01:59','2017-06-06 15:49:25') minutes_difference table1

'show table1 rows

select * table1

but getting negative value

minute_difference = -12 

here screenshot

please tell me what's wrong query. thanks!

just reverse last 2 arguments.


Comments

Popular posts from this blog

php - Vagrant up error - Uncaught Reflection Exception: Class DOMDocument does not exist -

vue.js - Create hooks for automated testing -

Add new key value to json node in java -