Format the cell C1 as General and then enter this formula:

=(B1-A1)*24