Page 1 of 1

Need do devide the numbers if '/' is found in the number

Posted: Tue Aug 11, 2009 5:27 am
by jaysheel
Hi,

I have a requirement where I am getting a Char(10) field from source. Which might contain data like '15/100', '345/10', '01/125' like this.
What I need to do is devide like each of them.
Means '15/100' as 15 devide by 100 and so on.
I am planning to use the field fucntion for this.
I have never used the field fucntion for this till now.
How would I search for the character '/' and then get the characters on its right and left side so that I can devide them.

Could anyone please help me on this Field function..?

Thanks in advance.

Posted: Tue Aug 11, 2009 5:30 am
by chulett
Write a routine. Use Index() to check for the "/".

Field(YourColumn,"/",1,1) would get the first field from a "/" delimited string while Field(YourColumn,"/",2,1) would get the second. Divide the two results.