Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Returning DATEDIFF Value As hh:mm:ss
Message
 
 
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Divers
Thread ID:
00635803
Message ID:
00635808
Vues:
15
>DATEDIFF(hh,dtStart,dtEnd) returns a value in whole integer hours only.
>
>How do I return the value expressed as hh:mm:ss ?
>
>Thanks for your help.
>

Try
CONVERT(char(8), DATEADD(second, DATEDIFF(second, dtStart, dtEnd), '20020101'), 8)
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform