Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations sizbut on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Conversion of Height Stored in Inches

Status
Not open for further replies.

eric333

IS-IT--Management
Nov 3, 2007
76
US
I have a field in which a person's height is stored in inches. Someone who is 6'2" has a value stored as 74". How can I convert the stored value to the more comment format of feet, inches?
 


Hi,

Don't they teach basic math in California?

12 inches per foot, is the coinversion factor.

Skip,

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
I was absent the day it was taught. Yeah, I know the conversion factor. What I don't know how to do in Crystal is write a formula that handles the conversion and displays the information in the desired format.
 
numbervar x := {table.number};
totext(truncate(x/12),0,"")+"'"+totext(remainder(x,12),0,"")+'"'

-LB
 
Thank you and saved for future use.
 



A simple version...
[tt]
ft = INT([inches]/12)
in = [inches] - ft * 12
[/tt]


Skip,

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top