Hours

Top  Previous  Next

hours(value, round(optional boolean))

 

The hours function accepts a decimal value (measured in hours) and returns the number of whole hours. The round parameter is optional (defaults to false for hours) and determines if the number of hours is rounded.

 

hours(4.5) will return 4

hours(4.67773) will return 4

hours(4.67773,1) will return 5 (rounded to nearest whole number of hours)

 

The hours function is normally used with the minutes function and the seconds function.