It would be easier if you wrote
10:30-17:45
with colons not stops
then, if that was in A1 this will give you 7,25
=MOD(RIGHT(A1,5)-LEFT(A1,5),1)*24
you need to ensure that all time show leading zeroes e.g
09:00-17:00
If you have to use stops not colons try
=MOD(RIGHT(SUBSTITUTE(A1,".",":"),5)-LEFT(SUBSTITUTE(A1,".",":"),5),1)*24