Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Display an integer as a time interval

Status
Not open for further replies.

HMK

Technical User
Jan 24, 2003
4
0
0
CA

Hi there,

I've got a column of integer data representing seconds, that I'd like to be able to display as a time interval (HH:mm:ss) in an Impromptu report.
Ie, get a number like 506 and display it as 00:08:26
and do this for a whole column of data.

Has anyone come up with a solution for this one using Impromptu?

There doesn't appear to be a function to convert from integer to interval, or any way to manipulate a number representing seconds into a time.

 
HMK,

You could probably do this with a combination of number-to-string, division, modulus, and integer-divide(which is unfortunately a local function.

Dave Griffin
The Decision Support Group
Reporting Consulting with Cognos BI Tools
"Magic with Data"
[pc2]
Want good answers? Read FAQ20-2863 first!
 
I've already gone that route, coming up with separate integers representing hours minutes and seconds through a mathematical formula performed upon the data, but I need to be able to display them as an interval - in interval format - in my impromptu report.

 
HMK,

Sorry but I don't see any function in Impromptu that allows that. Why do you need it as a true interval for your report?. Are you using the result in date math on other true dates? The conversion routine should be able to display it in interval convention (DDD HH:MM:SS) even without it being a true interval.

Dave Griffin
The Decision Support Group
Reporting Consulting with Cognos BI Tools
"Magic with Data"
[pc2]
Want good answers? Read FAQ20-2863 first!
 
If there is a conversion routine available to string a bunch of numbers together separated by colons all in the same field, I haven't discovered it.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top