dbTalk Databases Forums  

MM:SS

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


Discuss MM:SS in the microsoft.public.sqlserver.olap forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
hpanneflek@gmail.com
 
Posts: n/a

Default MM:SS - 05-23-2005 , 04:15 PM






I creating a cube measuring the speed of service of customers using our
drive-thru window. The data from the source shows the total number of
seconds (Ex. 200). I need to display in the cube the number in minutes
and second (Ex. 3:20). How do I do that?


Reply With Quote
  #2  
Old   
Deepak Puri
 
Posts: n/a

Default Re: MM:SS - 06-01-2005 , 02:42 AM






This earlier thread provides some solutions:

http://groups-beta.google.com/group/...rver.olap/brow
se_frm/thread/eea666208373f897/86c73c6da4180c10?q=timeserial&rnum=1#86c7
3c6da4180c10
Quote:
Newsgroups: microsoft.public.sqlserver.olap
From: Deepak Puri <deepak_p... (AT) progressive (DOT) com> Date: Sat, 05 Feb 2005
18:59:01 -0800
Subject: Re: 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/libr*ary/d...y/e*n-us/olapd
ma
d/agmdxadvanced_2aur.asp

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

http://groups-beta.google.com/*group...serv*er.olap/m.
..

From: Deepak Puri (d... (AT) progressive (DOT) com)
Subject: Time format Measure
This is the only article in this thread
View: Original Format
Newsgroups: microsoft.public.sqlserver.ola*p
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].[Av*gSpeedAnswer])',
FORMAT_STRING = 'hh:nn:ss'


Ohjoo Kwon Feb 6, 11:03 am show options

Newsgroups: microsoft.public.sqlserver.olap
From: "Ohjoo Kwon" <ojk... (AT) olap (DOT) co.kr> - Find messages by this author
Date: Mon, 7 Feb 2005 01:03:16 +0900
Local: Sun,Feb 6 2005 11:03 am
Subject: Re: How to format & display a measure which is in seconds to
HH:MM:SS
Reply to Author | Forward | Print | Individual Message | Show original |
Report Abuse

Siva,


If you mean "elapsed time in seconds", its format is not so easy and you
have to cosider more things because it does not point just "a point in
time".


If the elaspsed time is less than 24 hours, the next format is
sufficinet.


WITH
MEMBER Measures.Elasped AS '<Seconds> * 1/60/60/24', FORMAT_STRING =
'hh:mm:ss'


If the elaspsed time is equal to or more than 24 hours, the elapsed days
must be also considered.


WITH
MEMBER Measures.hhmmss AS '<Seconds> * 1/60/60/24'
MEMBER Measures.days AS 'DateDiff("d", CDate(0),CDate(hhmmss))'
MEMBER Measures.Elapsed AS 'CStr(days) + " Days " + Format(hhmmss,
"hh:mm:ss")'


If your final format is more complicate, you also consider using your
own
User Defined Function.


Ohjoo Kwon
www.olapforum.com
...
Quote:

- Deepak

Deepak Puri
Microsoft MVP - SQL Server

*** Sent via Developersdex http://www.developersdex.com ***


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.