datediff function calculating just work hours
Posted on 2004-03-30
i have the following variable that contains the number of hours between the two dates, startDate and endDate.
<cfset hourdiff = datediff("h", startDate, endDate)>
but this contains hours on the weekend and hours before 8 a.m and after 5 p.m
so basically i want to just calculate the number of "work hours" between these dates where work hours are monday through friday, 8 a.m - 5 p.m
how to do this?