Jump to content

This topic is 8166 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

Hi

I have this calculation to leave out the decimal separator:

Left(Amount,2) & Right(Amount,2)

When the user enters 20.34, the result is 2034. It works perfectly. The calculation won't work if the user enters 120.34 though. The result will be 1234 instead of having 12034. I cannot use Left(Amount,3) because it will not leave out the decimal separator when the user enter 20.34

Any idea?

Bikeman17

Posted

Hi

After writing down my problem, I found the solution. I might be the first user to reply to his own post. So here is the solution to my problem.

Create another calculation field with a logical function:

Case(Length(Amount) = 5,Left(Amount,2) & Right(Amount,2), Length(Amount) = 6, Left(Amount,3) & Right(Amount,2))

Have a great night Bikeman17

- Bikeman 17

Posted

I think that you'll find

TextToNum(Substitute(NumToText(Number), ".", ""))

effective for any length of integer and decimal.

This topic is 8166 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.