Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Convert int to time
Message
 
 
To
30/08/2007 22:35:40
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Miscellaneous
Thread ID:
01251546
Message ID:
01251548
Views:
11
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--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform