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.

Extract decimal only

Featured Replies

how do I extract the decimals in a number.

I want to convert meters in feet and inches.

The result should be in the form: 25'8"

First I multiply meters x 3.28 = feet and decimals

I have to convert those decimals

Decimals x 12/100

To achieve this, I have to extract the decimals.

How do I acheive this

Thanks

benicg

Edited by Guest

Try:

feet = Int ( m * 3.280839895 ) ;

inches = Mod ( m * 3.280839895 ; 1 ) * 12

Or:

feet = Div ( m ; 0.3048 ) ;

inches = Mod ( m ; 0.3048 ) * 39.3700787

Or:

in = m * 39.3700787 ;

feet = Div ( in ; 12 ) ;

inches = Mod ( in ; 12 )

  • Author

thank you "comment"

the first solution does not work;

For 1.85 meters=6 feet, the result for inches is .834645

As for the next 2 solutions there is no DIV function in my version of FileMaker.

Mine is Ver.6 on Windows XP

But I kept on working and found this:

Int( meter*3.280839895 )& " ' " & Int(Middle( meter*3.280839895; 3; 2)*12/100) & " '' "

The result for 1.85 meters is exactly 6'0" feet.

Result for 2 meters=6'6" feet which is the exact answer.

thanks again

benic

:idunno:

Your profile says version 7, and there is no indication of this question referring to another version (you get this option when you start a thread). Are we supposed to sense this somehow?

Anyway, Int ( a / b ) should get you the same result as Div ( a ; b ), at least for positive b.

Now, I am reasonably sure that 1 inch equals 2.54 centimeters.

185 centimeters divided by 2.54 is 72.8346457 inches.

Click here and you'll see I am not the only one to think so.

Hopefully I don't need to explain why 72.8346457 inches are 6 feet and 0.8346457 inches.

A foot may have different size, depending on country and its unit systems.

See http://en.wikipedia.org/wiki/Foot_(length)

There were similar problems with different length and weight measures with same name (e.g. "Elle", "Pfund", "pound", "Zentner") in European countries in the 19th century.

That's why one should use SI units. Otherwise we will still experience that mars expeditions will fail their aim :

For crying out loud: he said version 6 - not the 19th century!

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.