views:

3423

answers:

2

For example I have a value of 103.33 I want to put 100 to one variable and 33 to another variable. How can I do this?

Thanks.

+2  A: 

Create two formula fields, eg wholepart and decimalpart.

The formula for wholepart is trunc({yourfieldnamehere}) and the formula for decimalpart is {yourfieldnamehere} - trunc({yourfieldnamehere})

The value you get in decimalpart is going to be the decimal fraction; if you know it's always going to be a 2 digit decimal, multiply by 100. If it's variable, you could do a quick string conversion, count the digits and multiply by the appropriate power of 10.

Hampk

+1  A: 

Use trunc to get Integer portion and then subtract to get decimal portion. Convert decimal portion to text by ToText and then take Split function to get after "." from decimal portion

or

Use ToText and use Split function to get after and before "."

lakshmanaraj