Hi, I am facing problem rite now.. I want to calculate the date different minutes between 23:00:00 and 01:00:00.
My code :
datediff(Minute,'01:00:00','23:00:00')
The result is 1320 minutes. (22 hours)... But, the result that I want is 120 minutes (2 hours)...
Can anybody help ?
Thanks in advance...
You have to try this: datediff(Minute,'23:00:00','01:00:00')|||
suigion:
Hi, I am facing problem rite now.. I want to calculate the date different minutes between 23:00:00 and 01:00:00.
My code :
datediff(Minute,'01:00:00','23:00:00')
The result is 1320 minutes. (22 hours)... But, the result that I want is 120 minutes (2 hours)...
Can anybody help ?
Thanks in advance...
Try the link below for how to get correct hours from the SQL Server DateDiff function. Hope this helps.
http://www.stanford.edu/~bsuter/sql-datecomputations.html
No comments:
Post a Comment