Danbabe
05-14-2007, 12:38 PM
Hi guys,
yet again, I need your help. A user will enter the room measurements in Metres into a text box. I am trying to convert the Metres in Feet and Inches so the result will show both.
I have the following script already set-up:
'Bring in the text box
Dim fRoom
fRoom = Request.Form("room")
Dim Result, workFeet
workFeet = left(fRoom * 3.2808399, 5)
Result = fRoom & "m (" & workFeet & "')
If the user enters a low figure in Metres such as '1', then Result=
1m (3.280 ')
If the user enters a higher figure such as 10 then the Result=
10m (32.28')
What I need to do is write the feet and inches correctly. Is there anyway I can ask the code to show me all numbers to the left of the '.' in workFeet? Then show me all numbers to right of '.' of workFeet? So what I need from a number od 32.28 =
32
28
Any ideas chaps?
Cheers
Dan
yet again, I need your help. A user will enter the room measurements in Metres into a text box. I am trying to convert the Metres in Feet and Inches so the result will show both.
I have the following script already set-up:
'Bring in the text box
Dim fRoom
fRoom = Request.Form("room")
Dim Result, workFeet
workFeet = left(fRoom * 3.2808399, 5)
Result = fRoom & "m (" & workFeet & "')
If the user enters a low figure in Metres such as '1', then Result=
1m (3.280 ')
If the user enters a higher figure such as 10 then the Result=
10m (32.28')
What I need to do is write the feet and inches correctly. Is there anyway I can ask the code to show me all numbers to the left of the '.' in workFeet? Then show me all numbers to right of '.' of workFeet? So what I need from a number od 32.28 =
32
28
Any ideas chaps?
Cheers
Dan