April 3, 200619 yr 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.
April 3, 200619 yr 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.
April 3, 200619 yr Author 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 April 3, 200619 yr by Guest
April 3, 200619 yr 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 April 3, 200619 yr by Guest
April 6, 200619 yr Author 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.
April 6, 200619 yr 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.
Create an account or sign in to comment