Quantcast
Channel: VBForums - ASP, VB Script
Viewing all articles
Browse latest Browse all 688

How to convert feet and inches into inches using classic .asp

$
0
0
Hi,

I have thousands of different sizes that I need to convert from feet and inches into inches using classic .asp.

The sizes are listed in the following format:

[width] x [height]

The width and height are shown with ' marks, which stand for feet and " marks which stand for inches.

For example, take the following and convert it into inches:

2'6" x 8' = width = 30; height = 96
9'6" x 13'6" = widht = 120; height = 162

Sometimes there is no X in the size, indicating that it is round or square in shape. For example:

2'6"

That would have to make both the width and height the same, so:

2'6" = width = 30; height = 30

Sometimes, there is a trailing " at the end, where there should be inches, but there are none listed. For example:

5'0" x 8'" = width = 60; height = 96

I am guessing that I would need to create some sort of custom function with expressions, but just having a hard time figuring it out. Any pointers would be appreciated.

Viewing all articles
Browse latest Browse all 688

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>