---
title: "Interval to hours function"
canonical: "https://support.appfire.com/space/PSJC/1222738144/Interval%20to%20hours%20function"
format: markdown
---
> Macro (aura-html)


> Macro (excerpt)
> 
> Convert the interval value from a worklog or other source to hours.

```
function intervalToHours(interval time) {
    int m = time["TOMILLIS"];
    int hours = m/(1000*60*60);
    return hours;
}
```