August 3, 200421 yr I have four variable called start date, start time, finish date and finish time. I want to calculate the total time but when i do a simple finish time - start time and if the finish time is in AM(the next day) and start time is in PM i get a negative time. basically i want to involve all the four variables to calculate the total time and store the value in a variable. Can this be done? or is there an easier way to do this? Sorry im a dumb newbee
August 3, 200421 yr Hi infected, I suggest you use a calculation along the lines of: Case( not IsEmpty(start date) and not IsEmpty(start time) and not IsEmpty(finish date) and not IsEmpty(finish time) and (finish date > start date or finish time > start time), finish time - start time + (finish date - start date) * 86400 ) Most of the calc is there to stop bogus values from appearing before you've finished entering the required data for the calculation. The real work is all done on the fourth line...
Create an account or sign in to comment