Skip to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Date Calculations

Featured Replies

I have 2 Date Calculations I need to figure out, and I figured I'd ask them here first before driving myself crazy trying to get it right.

Duration Between two times would be time2-time1? How do i get it be a duration and not an AM or PM? How about if time2 goes into the next day?

And here's the hard one.

The result of that duration needs to be multipled with a percentage, I.E. a 6 second duration times 10% equals 1 second. How would I do that?

What I'm trying to achieve is this ... I have a bunch of lenghty functions, I will know the average duration of them (caluclation #1). With that average, i will then use it to let the user know approximatly how much time is remaining based on where in the script the process is, and the average time for the entire call.

Thanks.

(End Date - Start Date) * 86400 + time2 - time1

Don't make the result a time field. It should be a number for the number of seconds elapsed.

I'm not understanding your second question. How does 6 seconds * 0.1 = 1 second?

  • Author

My bad, i meant 10 seconds * 1% = 1 second.

keep in mind too, result may be hours/mintues/seconds.

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.