# Time vs Number in calculation

This topic is 6554 days old. Please don't post here. Open a new topic instead.

## Recommended Posts

Hello,

My problem is, I have 2 time fields, "Begin Job" and "End Job", I also have a number field "cost"

I want to calculate (End Job - Begin Job) and * (cost)...

But I don't know how to calculate number and time field??

I need help!!!

Thanks!

Bruno

##### Share on other sites

Time is stored as the number of seconds past midnight. So, you can simply subtract one time from the other to get a number of seconds. To convert to hours, divide by 3600.

(End Job - Begin Job) /3600 * Cost

Assuming cost is \$/hour

If the job starts on one day and ends on another then you need to account for that:

((End Job Day - Begin Job Day)*24 + (End Job - Begin Job) /3600) * Cost

##### Share on other sites

This topic is 6554 days old. Please don't post here. Open a new topic instead.

## Create an account or sign in to comment

You need to be a member in order to leave a comment

## Create an account

Sign up for a new account in our community. It's easy!

Register a new account