# Calculation from time started, hours worked

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

## Recommended Posts

Hi, I need help generating a calculation. I am creating a scheduling database and in an effort to save time and eliminate error i would like the user to input the amount of hours projected to work and the start time. From those two fields i would like to generate the end time automatically. Can someone please help me out. i'm using field names: start time, hours, and end time.

##### Share on other sites

There may not be enough information. Is this a straight calculation or does it need to wrap around work hours and work days? Do you need to add in for breaks etc...

example

StartDate = Friday, April 7th 2006

StartTime = 2pm

Hours = 12

End Time =

a) April 8th 2am?

April 10th 2pm( 9-5, Mon - Fri workweek)

c) April 10th 2:30pm(9-5, Mon - Fri workweek with a thirty minute lunch)

d) some other rules apply and the date and time are completely different.

##### Share on other sites

This is a straight calculation, no work hours etc. the answer should be 2 am for your setup there. i want it to calculate the 2 am response. is that possible?

Edited by Guest
##### Share on other sites

Try:

Mod ( StartTime + Duration ; 86400 )

Set the result to type Time.

If you want to input duration as the number of hours instead of time, use:

Mod ( StartTime + Hours * 3600 ; 86400 )

Edited by Guest
##### Share on other sites

I guess i can put the start time as HH:MM AM/PM, Hours as HH:MM and end time as HH:MM AM/PM. how would i do that if using hours as a time instead of a number? The above calculation did not work. It only output the start time.

##### Share on other sites

The first formula requires StartTime and Duration to be Time fields.

The second formula requires StartTime to be a Time field, and Hours to be a Number field.

The output is Time, in both.

If you prefer to input data as text, you will need to convert it to time before plugging it into the formula.

##### Share on other sites

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

## Create an account

Register a new account