You could try having one field for days and one for hours and using a formula field to consolidate it for you
e.g.
- "Hours" number field
- "Days" number field
- "Consolidated Hours" formula field that either outputs the number from the "Hours" field if it's populated, or if the "Days" field is populated it outputs the value from "Days" * 24 to give the number of days as hours, allowing you to use this field in calculations