Re: Q: formatting INTERVAL output?
Posted in 1995
Andreas Dunker (andreas@hacon.de) wrote: : I have a table with four columns: : cur_no serial : my_date date : from datetime hour to minute : to datetime hour to minute : ... : after group of my_date : print column 24, group total of to - from, " h" : skip 1 line I think you'll have to define an INTERVAL of type hour(n) to minute, where n is the number of digits maximum for hour. You're running into a default for an INTERVAL of 2 digits. So, from my rusty ace memory and some quick manual scanning: DEFINE VARIABLE tot_interval INTERVAL HOUR(4) TO MINUTE ... END ... AFTER GROUP OF my_date LET tot_interval = GROUP TOTAL OF to - from PRINT COLUMN 24, tot_interval, " h" SKIP 1 LINE (I get an "A" if all my syntax is right) : on last row : print column 15, "sum:", column 24, total of to - from, " h" : Now, if the "total of to - from" is greater then 99:59, the report : prints only asterisks. Is there a way to print intervalls longer than : 100 hours? : Andreas : -- : ------------------------------------------------------------------------ : Andreas Dunker 2B || ! 2B : andreas@hacon.de (W. Shakespeare) -- ======================================================================= Dennis J. Pimple dennisp@informix.com Opinions expressed Senior Consultant -------------------- are mine, and do not Informix Software Inc Voice: 303-850-0210 necessarily reflect Denver Colorado USA Fax: 303-779-4025 those of my employer.