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, Could someone assist me with this problem in FM 5: I have a starttime field and an endtime field. I do not know how to format them as time fields. I wish to use a calculated field to return the difference in decimal, to one decimal place. The formula needs to account for times either side of midnight. I would prefer not to have to enter accompanying dates as this circumstance occurs often enough to warrant allowing for it, but not often enough to justify two date fields.

I have tried Timecalc=If(endtime<starttime,endtime+24,endtime)-starttime. The value returned does not make sense.

Thanks for any assistance offered.

Give this a try. Times must be entered as 24 hours times using "16:30" type notation.

DeltaTime (calculation, number) =

Round(

Int(Case(EndTime * StartTime, EndTime - StartTime, EndTime - StartTime + Time(24, 0, 0)) / 3600)

+

Minute(Case(EndTime * StartTime, EndTime - StartTime, EndTime - StartTime + Time(24, 0, 0))) / 60

+

Seconds(Case(EndTime * StartTime, EndTime - StartTime, EndTime - StartTime + Time(24, 0, 0))) / 3600

,1)

-bd

[ July 08, 2001: Message edited by: LiveOak ]

  • Author

Thanks for the help. Maybe cause its 0100 or maybe cause I am not upto speed, could you please clear up some dumb questions for me. One, how do ensure that time values hh:mm are being entered into the fields used for calculation? Two, what do I do with the formula text that you have provided if I want the result to be diplayed by a calculated field?

Thanks for the patience.

1) Set the field validation for the time fields to be "Strict" of type "Time" and 2) Use the forumula text as the definition for the calculation field. In my example you will define the following fields:

StartTime (time, strict time validation, can't override)

EndTime (time, strict time validation, can't override)

DetlaTime (calculation, number) = [use the formula I gave you]

The forumula text IS the definition of the calculation field. You can copy and paste the formula after the "=" into the field definition, if you define the two entry fields as above.

-bd

  • Author

bd, Thanks mate. That solved my problem perfectly.

Smithy

Glad to help. -bd

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.