Jump to content

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

Recommended Posts

Posted

Is there a way to show a field with a calcuation that shows time elapsed based on two fields?

For example there is a "Start Time" field and "End Time" field (so say "1200" to "1315" military time) and the calcuation field would show "1:15" for the time elapsed.

Hope that makes sense and THANK YOU in advance for anyone who knows how to make this calculation!

Posted

... except of course when the end date is past minight, in which case you'll end up with a negative result.

To solve this you need to take the start Date and End Date into account.

End Time - Start Time + ( End Date - Start Date ) * 3600 * 24

The "3600 * 24" is there because time is measured in seconds, while dates are measured in in days. There are 3600 * 24 seconds in a day.

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