Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Date Difference.
Message
 
 
À
04/07/2005 23:50:29
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Autre
Divers
Thread ID:
01028878
Message ID:
01029234
Vues:
13
This message has been marked as the solution to the initial question of the thread.
>HI do u have any scripts that get the diffence of Datatime in hrs, Min, Seconds .

Assuming that the difference is less than 24 hours
DECLARE @dt1 datetime, @dt2 datetime
SET @dt1 = '2005/07/01 10:45:15'
SET @dt2 = '2005/07/01 17:23:37'
SELECT CONVERT(varchar(20), CAST(@dt2 - @dt1 AS datetime), 108)
--sb--
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform