add hours to start time

jk12

Always getting problems.
Local time
Today, 18:42
Joined
Feb 16, 2006
Messages
91
Hi all,

I am using the below expression in my query to caluculate the finish time.

Finish: DateAdd("h",[workedhours],[StartTime])

I know this is not the best way to do what I want and that it would be a lot easier to have a start time a finish time and then work out the hours between the two but the powers above me want the finish time calculated from hours being inputed.

My problem is the above expression works fine for whole numbers but not half numbers i.e. 07:30 add 1 hour gives 08:30 but 07:30 add 1.5 doesn't give 09:00 it still shows 08:30.

Any ideas on how to solve this one?

FYI: 07:30 would be from a date/time field, 1 hour would be from a numeric field in the table.
 
I haven't tested, but try:

Finish: DateAdd("n",([workedhours] * 60),[StartTime])
 

Users who are viewing this thread

Back
Top Bottom