Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Understanding DATEDIFF()
Message
De
16/04/2015 16:01:44
 
 
À
Tous
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Titre:
Understanding DATEDIFF()
Versions des environnements
SQL Server:
SQL Server 2012
Application:
Web
Divers
Thread ID:
01618557
Message ID:
01618557
Vues:
36
If I have this:
SELECT SUM(DATEDIFF(d,Holiday.Start,Holiday.End))
...I can obtain 365.

Now, if I change the type to s, to obtain this same amount in seconds:
SELECT SUM(DATEDIFF(s,Holiday.Start,Holiday.End))
...I obtain 23533200.

However, If I do 23533200/84600, I do not obtain 365 days but only 272.38.

What am I missing?
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform