so extend the function.
you need to know what the length of a standard working day is
and then add the proportion of the part whole days (the start and end datetimes from that.
so the psuedo code would be something like:-
workout the number of time units in a working day (id probably do that as seconds
work out how many of those time units you've worked on the starting day
work out how many of those time units you've worked on the ending day
add this values together, convert it into required time units
I'd implement the working it number of units worked as a function and call it twice (once for start and once for finish). I'd suggest you supply the cutoff time (of either start or finish working) as part of the fucntion call so you can re use the code with different values
if you supply say the start of the working day then you maths is fairly simple
nosecondsinworkingday = 8 * 60 * 60 'assumign an 8 hour working day converted to seconds
workingtime = nosecondsinworkingday - calcnosecondsworked(startofworktime,format(startda te,"HH:MMS")
workingtime = workingtime + calcnosecondsworked(startofworktime,format(enddate ,"HH:MMS")
workingtime = workingtime / nosecondsinworkingday
I'd rather be riding on the Tiger 800 or the Norton