I'm currently working on a work/time log in a Google Spreadsheet. I'm doing some calculations on how much time I've spent working.
I have a cell containing the number of worked hours represented in a "Time value" number.
E.g. 13:30 hours is represented as 0.559
. And I want to represent it as 13,5
.
In the cell's function I can do HOUR(0.559)
to get the hours. But I want to use my custom function (due to otherwise very long expressions in the cell), like HoursToDecimal(0.559)
Now, I cannot use the HOUR()
function in my function because it says its not defined? How can I use it?
function HoursToDecimal(hours_in)
{
return (INT(hours_in)*24+HOUR(hours_in)+MINUTE(hours_in)/60);
}