Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Usage of DateDiff
Message
 
 
To
20/11/2014 09:52:30
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Environment versions
SQL Server:
SQL Server 2012
Application:
Web
Miscellaneous
Thread ID:
01611233
Message ID:
01611236
Views:
57
This message has been marked as the solution to the initial question of the thread.
No it'll not be precise. It's literally difference between hours in both dates w/o any respect to Minutes, seconds, milliseconds

>If I have a select like this:
>
>
>SELECT SUM(DateDiff(Hour,Start,End)) AS Hour...
>
>
>Will the Hour value obtained be as precise as this:
>
>
>SELECT SUM(DateDiff(Second,Start,End)/3600) AS Hour...
>
>
>Basically, the second one would provide a precision. So, Hour can end with something like 34.23.
>
>I am wondering if the first one is having a precision for Hour if that DateDiff will be rounded to an integer such as 34.
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform