dbTalk Databases Forums  

converting milliseconds to hh:mm:ss:SSS

microsoft.public.sqlserver.olap microsoft.public.sqlserver.olap


Discuss converting milliseconds to hh:mm:ss:SSS in the microsoft.public.sqlserver.olap forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Nikhil Sharma
 
Posts: n/a

Default converting milliseconds to hh:mm:ss:SSS - 08-03-2004 , 06:04 AM






Hi
I have a measure column that stores the value in
milliseconds .While returning it from the cube i want to
display it in hh:mm:ss:SSS format

Thanx in advance

Reply With Quote
  #2  
Old   
Jacco Schalkwijk
 
Posts: n/a

Default Re: converting milliseconds to hh:mm:ss:SSS - 08-03-2004 , 08:38 AM






If you don't have more than 24 hours worth of milliseconds:

SELECT RIGHT(CONVERT(CHAR(25), DATEADD(ms, <milliseconds>, '19000101'),
121), 14)

--
Jacco Schalkwijk
SQL Server MVP


"Nikhil Sharma" <anonymous (AT) discussions (DOT) microsoft.com> wrote

Quote:
Hi
I have a measure column that stores the value in
milliseconds .While returning it from the cube i want to
display it in hh:mm:ss:SSS format

Thanx in advance



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.