Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to use datetime difference in SQL Select?
Message
 
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Environment versions
SQL Server:
SQL Server 2005
Miscellaneous
Thread ID:
01390159
Message ID:
01390339
Views:
52
>>SELECT SUM(cast(Fld2-Fld1 as int)) FROM @Test
>>SELECT SUM(DATEDIFF(dd,Fld1,Fld2)) FROM @Test
>>
>
>Thank you.

You're welcome. Having fun working with SQL Server?
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform