Translating with DrWatson… this can take a few seconds the first time.
This is a genuine, complex translation. DrWatson protects commands, error codes, and log output while naturally translating the surrounding text. It’s translated once and saved.
John H. Frantz — — source: Informix-list mailing list archive (1991-1998)
Santiago Albanese <75030.2743@CompuServe.COM> wrote:
> Is there a way to convert an hour to minutes interval to
>a decimal value for a report ? . I am running a 4gl prog that
>reports hors worked in the interval form of ( 8:40 ) for eigth
>hors and forty minutes and I want to display it as 8.66 hours . I
>have worked a solution with awk but would prefer to do it with
>4gl code .
>
> Thanks in advance ,
> Chago
Following is a function (included in the Power-4gl toolset) which I
believe solves your problem:
#########################################################################
# Conversion of interval time period to decimal hour format.
#########################################################################
function hourtime(i)
define
i interval minute(9) to minute,
x char(10),
d decimal
let x = i
let d = x
let d = d / 60
return d
end function
We use strictly necessary cookies to make this site work. With your
consent we’d also use optional cookies for analytics and marketing. You can accept all,
reject all, or choose. Read our Cookie Policy.