hi everybody i'm new to cognos world and some problem with report studio.
i produce a package with framework manager, in this i have a column (query item) that contain a number of minutes es 480 = 8 hour, the problem is that i don't know how to find and concatenate the decimal value that there is if i have a value es 2533 that corresponding to 44hour and 13 minutes, seconds are not important.
I have try some solution but very bas result.Can someone tell me how to do this in cognos report studio, or better i think in framework manager.
Thx to all
I am not really sure of what you are trying to accomplish, but as I understand it you have a column containing integers that you want to convert to hh:mm.
There must be lots of ways to solve this; one approach is to setup three calculated query items:
lets say your original query item with integers is called [namespace].[query subject].[Integer]
->Set up item 'hour', 'minute' and 'HH:MM'
make the 'hour' item use this calculation:
cast_integer(([namespace.[query subject].[Integer]/60))
this will give you the hour part of the integer
say your integer is 1967 - 'hour' will return 32
make the 'minute' item use this calculation:
[namespace].[query subject].[Integer] - ([namespace].[query subject].[Hour]*60)
this will give you the minute part of the integer
say your integer is 1967 - 'minute will return 47
make the 'HH:MM' item use this calculation:
trim(cast_char(cast_integer([namespace].[query subject].[Hour] )))+
' H '+
trim(cast_char([namespace].[query subject].[Minute]))+
' M'
say your integer is 1967 - 'HH:MM' will return 32 H 47 M
However this method will not actually convert 1967 to a timestamp but just calculate how many hours and minutes there is in 1967. If you want to convert it to a timestamp you need to take a differnt approach.
I made this in FWM - you could probably use it in report studio as well, but FWM seems better.