To calculate the number of hours between two date and time fields, add a formula field and specify the formula expression as ((To_Date - From_Date) / (1000 * 60 * 60))
form Sample
{
FromDate
(
type = datetime
)
ToDate
(
type = datetime
)
Hours
(
type = formula
value = ((To_Date - From_Date) / (1000 * 60 * 60))
)
}