Showing posts with label specify. Show all posts
Showing posts with label specify. Show all posts

Sunday, February 26, 2012

Format measure from milliseconds to HH:MM:SS

Hi,

I have a measure that contains milliseconds, I want to display it in the HH:MM:SS format.

How to specify the format string?

please help.

Regards

Vijay R

Hi Vijay,

This thread from the public SQL Server OLAP Newgroup discusses some approaches:

http://groups.google.com/group/microsoft.public.sqlserver.olap/msg/37b9ae771bc762bc

>>

microsoft.public.sqlserver.olap > How to format & display a measure which is in seconds to HH:MM:SS

This MSDN link discusses FORMAT_STRING options for cube measures:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/olapdma
d/agmdxadvanced_2aur.asp

This earlier post shows how to format hh:mm:ss

http://groups-beta.google.com/group/microsoft.public.sqlserver.olap/msg/
13d3af02580a7257

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/olapdma
d/agmdxadvanced_2aur.asp

This earlier post shows how to format hh:mm:ss

http://groups-beta.google.com/group/microsoft.public.sqlserver.olap/msg/
13d3af02580a7257


From: Deepak Puri (d...@.progressive.com)
Subject: Time format Measure
This is the only article in this thread
View: Original Format
Newsgroups: microsoft.public.sqlserver.olap
Date: 2004-04-24 21:53:31 PST

Try the following format, if time is < 32K seconds:

With Member [Measures].[FormattedASA] as
'TimeSerial(0,0,[Measures].[AvgSpeedAnswer])',
FORMAT_STRING = 'hh:nn:ss'
>>

Sunday, February 19, 2012

Format

How can I specify the format in check constraint while creating a table like
SSN format should be :- 000-00-0000
Thanks
NOOR
On Fri, 27 Aug 2004 07:58:13 -0700, Noor wrote:

>How can I specify the format in check constraint while creating a table like
>SSN format should be :- 000-00-0000
>Thanks
>NOOR
Hi Noor,
Check Books Online. The article about CREATE TABLE has some great examples
that you can easily adapt for this.
Best, Hugo
(Remove _NO_ and _SPAM_ to get my e-mail address)
|||Thanks Hugo
"Hugo Kornelis" <hugo@.pe_NO_rFact.in_SPAM_fo> wrote in message
news:1akui0pgv94e9lam9frjl0qefb918f3q1v@.4ax.com... [vbcol=seagreen]
> On Fri, 27 Aug 2004 07:58:13 -0700, Noor wrote:
like
> Hi Noor,
> Check Books Online. The article about CREATE TABLE has some great examples
> that you can easily adapt for this.
> Best, Hugo
> --
> (Remove _NO_ and _SPAM_ to get my e-mail address)