Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Convert int to time
Message
 
 
À
30/08/2007 22:35:40
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Divers
Thread ID:
01251546
Message ID:
01251548
Vues:
14
This message has been marked as a message which has helped to the initial question of the thread.
T-SQL isn't very good with formating data. Usualy it can be done much easier in frontend.
DECLARE @it int
SET @it = 64116
SELECT STUFF(STUFF(RIGHT('000000' + CAST(@it AS varchar(10)),6), 3,0, ':'), 6,0, ':')
>
> I have a field(Integer) and i want to convert it to time using select Statement.
>Example - 64116
>output will be - 06:41:16
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform