<script language="vbscript">
function timecompute(start_time,end_time)
if datediff("s",start_time,end_time)<0 then
timecompute="起止时间不能大于终止时间"
else
timecompute=datediff("h",start_time,end_time)
end if
end function
msgbox timecompute("2007-10-7 17:00","2007-10-7 19:00")
</script>