Jump to content

Persons Height Calc


Totes

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

Recommended Posts

Hi,

I have a field for a person height, and I have attempted to convert a persons height from: 610 to 6'10" or 63 to 6'3"

I can get the first sign for the feet (') but I cant get the inch sign (") to set properly it keeps adding the first number to the end.

Can someone help, I have done a search but cannot find anything.

Thanks

Link to comment
Share on other sites

Heres a calculation that BobWeaver posted a couple of years ago that should do what you want.

Int([color:blue]Inches / 12) & "'" & " " & Mod( [color:blue]Inches;12) & """

If your Field name is not Inches, substitute it for Inches in this calculation.

HTH

Lee

Link to comment
Share on other sites

Lee,

Thanks, I put it in place and it is placing the (') and the (") in the correct location however it is converting total inches... to feet & inches.

The user of this DB will know that the person is 6 feet, 3 inches, so they would enter 63, and I need a calc that would change it to 6'3".

What I tried to do was a similar to my phone calc that I have:

Let( P = Filter(Phones; "1234567890" ); "(" & Left( P; 3 ) & ") " & Middle( P; 4; 3 ) & "-" & Middle( P; 7; 4 ) )

I was attempting to use a variant of the above phone calc(of course cut down to filter 3 numbers). but I could not get it to work, if the person was 6'10" it would return 6'1" (I would post a copy of what I had, however I gave up and deleted it)

Edited by Guest
Link to comment
Share on other sites

Thanks comment that one worked.

See, I never even thought of breaking down the feet and inches into 2 fields, that would have saved me many many hours of beating my head on the desk.

May I ask one: I was not toooooo far off from the solution you posted, however I did not have the "Lenght -1" in my original calc. Could you explain that to me or point me to something that would better explain this calc to me. I really do not fully understand this one.

Thanks,

James

Link to comment
Share on other sites

The basic assumption here is that no one is shorter that 1' or taller than 9'11". So the first character in the string is always the feet component. The rest of the characters form the inch component.

The string's overall length can be either 2 or 3 characters. To extract all characters except the first (i.e. leftmost) one, you'd take the characters starting from the right, and ending just before the last one.

Link to comment
Share on other sites

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