How to get the average of hours when one divisor is numeric and the other is text?
Posted on 2004-08-09
I have a CF web app the allocates hours to employees. The data is written to an access table.
I also have a display page with the hours data that displays all the week's records that have been requested.
This page has the employee their hours and the total hours allocated.
I want to divide the total hours by the total number of employees. Both numbers are dynamic, as it is not the same amounts every week. The total hours is a numeric value in the table and the employee field is a text value.
When I wrote this, it gave me an error that division was not possible between data types.
How can I get what I need?
<cfset average_emp=(#GrandThourCnt#+#hours#) / #getEmps.emp#>