The below utilises NETWORKDAYS function which forms part of the Analysis ToolPak Add-In - pre XL2007 this must be activated via Tools -> AddIns (else #NAME? will result)
=MAX(0,NETWORKDAYS(A1,A2,holidays)-1+MOD(A2,1)-MOD(A1,1)*((WEEKDAY(A1,2)<6)*(COUNTIF(holidays,INT(A1))=0)))
format cell as [hh]:mm
where Holidays is a named range containing a listing of public holidays which are to be excluded
Does that work for you ?
edit: above is based on your assertion that start datetime might occur on a weekend but have assumed end datetime does not
Bookmarks