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
Post a Comment