infected Posted August 3, 2004 Posted August 3, 2004 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
CobaltSky Posted August 3, 2004 Posted August 3, 2004 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...
infected Posted August 4, 2004 Author Posted August 4, 2004 thanks a lot man, it worked out really well.
Recommended Posts
This topic is 7678 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 accountSign in
Already have an account? Sign in here.
Sign In Now