probably what I would start with finding the number of days between the 2 dates:
datediff("d", day1, day2)
I would also find the day of the week for each date...this would be used to determine the number of weekends to subtract from your datediff. You might try find the differences in weeks, but I am not sure how it calculates the weeks.
Either way, find the total number of days difference. I think that I would try finding the difference of the times for the same date...put the starting time on a date..any date, and the ending time on the same date, this will give you a number of minutes. Then you can take the number of days (already adjusted for weekends) x *( 12 * 60) [24-12 for the hours of operations] +- time diff.
At least that is the approach that I would attempt. If it doesn't succeed, perhaps it will yield insights as to how to proceed.
HTH