One cell in a Google Sheets document holds a value given by a SUM of cells formatted as "elapsed hours":"elapsed minutes". Attempting to make calculations in a custom script on this cell will throw errors. Further investigation using typeof() function will show this as "object". How can I convert the cell value to number? Attempted parseInt() or parseFloat() unsuccessfully....
In the linked sheet here you will see that:

cell A1 having a formula that returns 288:00 formatted as duration,

cell A2, having =daysHrsMins(A1), that returns a negative value, -3.179.700.519.840.000,00 from the following function:

Thanks Ruben, I thought that the format is just applied when displaying values, without altering the cell/variable type. Is there a way to pull an "object" and convert it accordingly?
– RiccardoOct 20 '17 at 8:14

I have attempted to access the cell using getHours() function, but the result is wrong. Changed the function as follows function myHours(input) { return input.getHours(); }
– RiccardoOct 20 '17 at 14:03

I have changed the function to function daysHrsMins(input) { return TO_PURE_NUMBER(input); } and now I get an error: "Error ReferenceError: "TO_PURE_NUMBER" is not defined. (line 2)."
– RiccardoOct 22 '17 at 19:16