Quebec City Posted February 12, 2004 Posted February 12, 2004 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
BobWeaver Posted February 12, 2004 Posted February 12, 2004 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
Recommended Posts
This topic is 7659 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 accountSign in
Already have an account? Sign in here.
Sign In Now