Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 7414 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

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 confused.gif

Posted

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... smirk.gif

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