Jump to content
Server Maintenance This Week. ×

Calculation from time started, hours worked


This topic is 6594 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.

Link to comment
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.

Link to comment
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
Link to comment
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.

Link to comment
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.

Link to comment
Share on other sites

This topic is 6594 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

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.