COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: perspolis09 on 24 May 2013 05:06:22 AM

Title: Date function
Post by: perspolis09 on 24 May 2013 05:06:22 AM
Hi!

This function works correctly but the end result is an individual, example show number '5 'but I would like that this number would appear in this time of 00:05.00 as.

(extract(hour,[Business].[Use Deviation].[END_TIMES]  )*60+extract(minute,[Business].[Use Deviation].[END_TIMES]  ))-(extract(hour,[Business].[Use Deviation].[START_TIMES]  )*60+extract(minute,[Business].[Use Deviation].[START_TIMES]  ))+_days_between([Business].[Use Deviation].[START_TIMES] ,[Business].[Use Deviation].[END_TIMES] )*1440

any idea? please help with this.
Title: Re: Date function
Post by: MFGF on 24 May 2013 07:48:54 AM
You cound try casting this as an interval hour datatype?

cast([your calc], interval hour)

Then maybe you could specify a time interval format and turn the relevant parts of the time on and off?

Just a thought - I can't verify this at the moment so it's off the top of my head.

MF.