dbTalk Databases Forums  

Time Format (Does not add up)

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


Discuss Time Format (Does not add up) in the microsoft.public.sqlserver.olap forum.



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

Default Time Format (Does not add up) - 08-31-2003 , 07:43 PM






The value of fact 1 is 22:44 representing is 22 hours and
44 minutes.

The value of fact 2 is 8:40 representing 8 hours and 40
minutes.

AS2K is returning 7:25 which is representing (22:44 +
8:40) = 31:25 - 24. The format on the field is hh:mm. A
format of dd hh:mm results in 06 22:44 and 06 8:40 and 14
07:25. The field type is dbtime. I have dbdate and
dbtimestamp with similar results.

Is this a bug? Does any have a solution if not a bug or a
work around if a bug?

Reply With Quote
  #2  
Old   
Mosha Pasumansky [MS]
 
Posts: n/a

Default Re: Time Format (Does not add up) - 08-31-2003 , 11:54 PM






Quote:
The value of fact 1 is 22:44 representing is 22 hours and
44 minutes.

The value of fact 2 is 8:40 representing 8 hours and 40
minutes.

AS2K is returning 7:25 which is representing (22:44 +
8:40) = 31:25 - 24.
Are you looking at VALUE or at FORMATTED_VALUE cell property ?
If you execute the query from MDX Sample, you can double click on the cell
to see both of them.

--
==================================================
Mosha Pasumansky - www.mosha.com/msolap
Development Lead in the Analysis Server team
All you need is love (John Lennon)
Disclaimer : This posting is provided "AS IS" with no warranties, and
confers no rights.
==================================================




Reply With Quote
  #3  
Old   
Martin Harmelin
 
Posts: n/a

Default Re: Time Format (Does not add up) - 09-16-2003 , 02:47 AM



I have the same issue. My question is what data types to
use on the fact table (currently datetime) and for the
measure in the cube (currently DBTime) to make this work.
I am only interested in the time value, not the date. The
measure is a time interval in minutes and seconds at the
base level. Aggregation is fine as long as the total
doesn't exceed 24 hours. Using 'dd' in the format string
gives the day from the date part of the input. Since I
can't enter a zero date, and I can't find a 'Time only'
format, the aggregation for days is coming from the date
rather than the total hours.

Any suggestions appreciated


Quote:
-----Original Message-----
The value of fact 1 is 22:44 representing is 22 hours
and
44 minutes.

The value of fact 2 is 8:40 representing 8 hours and 40
minutes.

AS2K is returning 7:25 which is representing (22:44 +
8:40) = 31:25 - 24.

Are you looking at VALUE or at FORMATTED_VALUE cell
property ?
If you execute the query from MDX Sample, you can double
click on the cell
to see both of them.

--
==================================================
Mosha Pasumansky - www.mosha.com/msolap
Development Lead in the Analysis Server team
All you need is love (John Lennon)
Disclaimer : This posting is provided "AS IS" with no
warranties, and
confers no rights.
==================================================


.


Reply With Quote
  #4  
Old   
Mosha Pasumansky [MS]
 
Posts: n/a

Default Re: Time Format (Does not add up) - 09-16-2003 , 12:22 PM



"Martin Harmelin" <martinh (AT) cubespace (DOT) com.au> wrote

Quote:
I have the same issue. My question is what data types to
use on the fact table (currently datetime) and for the
measure in the cube (currently DBTime) to make this work.
I am only interested in the time value, not the date. The
measure is a time interval in minutes and seconds at the
base level. Aggregation is fine as long as the total
doesn't exceed 24 hours. Using 'dd' in the format string
gives the day from the date part of the input. Since I
can't enter a zero date, and I can't find a 'Time only'
format, the aggregation for days is coming from the date
rather than the total hours.

Any suggestions appreciated
Interesting problem. The only suggestion I have is to use DATEPART SQL
function on the measure to convert it to another data type, like integers
and extract count of minutes. Then minutes will get aggregated properly and
for display purposes can be reformated as hh:mm.
I am curious if somebody came up with better solution.

--
==================================================
Mosha Pasumansky - www.mosha.com/msolap
Development Lead in the Analysis Server team
All you need is love (John Lennon)
Disclaimer : This posting is provided "AS IS" with no warranties, and
confers no rights.
==================================================




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.