Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to use datetime difference in SQL Select?
Message
 
 
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Versions des environnements
SQL Server:
SQL Server 2005
Divers
Thread ID:
01390159
Message ID:
01390174
Vues:
72
This message has been marked as a message which has helped to the initial question of the thread.
SELECT SUM(CAST(DATETIME1 - DATETIME2 AS int))  AS NUMDAYS
>
>How do you SUM number of days difference between two DateTime type fields as following:
>
>
>select SUM( DATETIME1 - DATETIME2) AS NUMDAYS
>
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform