def get_hours_from_duration(duration):
    """
    Get the hourse from a given duration

    :param duration: the duration of the measurement
    :type duration: date object
    :returns: float
    """
    return round(duration.seconds / 3600.0, 2) + duration.days * 24
