15
Views
2
Solved
###### Is it possible to find what number is in a specific decimal place?
Question
Application Type
Mobile

Hello!

So I was wondering if it is possible to find what number is in specific decimal places.

For example, I would like to get:

- 3 in 2.345

- 4 in 2.546

- 1 in 3.134

I feel like this is a really dumb question but is there a function or a way for me to be able to do this?

Cheers!

Solution

Hi Lucas, nothing is dumb to ask on what concerns to programming :)

That is possible but only after converting the decimal to a string.

• Find the position of "." using Index function -> Index(Value, ".")
• Knowing the position you will now be able to search for the number in the decimal position
• i.e. You want to know the number in position 2 of 2.54
• Substr(Value, Index(Value, ".") + 2, 1)

I didn't test, it may need an adjustment but the logic is there.

Ah alright, that makes a lot of sense, thank you so much!

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.