Jump 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.

Featured Replies

Hi all

 

I'm attempting to have a traditional time field (ttimein & ttimeout) hh:mm converted to a decimal figure and have the total hours calculated in the decimal format. ttimein would be converted into field dtimein, ttimeout = dtimeout, and ttimetotal = dtimetotal. I'm struggling with the math that would create this conversion (no doubt in my mind it's more simple than I'm thinking).

 

For those unfamiliar:

 

20:10 would be 20.17

9:22 would be 9.37

23:57 would be 23.95

 

etc.

 

Some hours would extend past midnight (i.e. start at 16:00 and end at 02:00).

 

I would also be interested in how this could be reversed -- decimal time reverted to traditional time.

 

Thanks!

  • Author

I seem to have got it working using:

ttimein / 3600

Still interested in the latter portion of my original post though.

 

:)

Try =

Timefield / 3600

Result is Number, of course.

 

 

Some hours would extend past midnight (i.e. start at 16:00 and end at 02:00).

 

In such case, you need to add 24 hours to the end time, either before or after the conversion to decimal hours - for example =

( EndTime - StartTime ) / 3600 + 24 * ( StartTime > EndTime )
I would also be interested in how this could be reversed -- decimal time reverted to traditional time.

 

Naturally, you need to multiply by 3600 to get the original value back. If the calculation field's result type is NOT time, use =

GetAsTime ( DecimalHours * 3600 )

Create an account or sign in to comment

Important Information

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

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.