Get the number of digits after the decimal point of a float (with or without decimal part)
<p>I have following list of <code>Amount (float)</code> in my table.</p>

<pre><code>Amount
123
123.1
123.0123
123.789456
</code></pre>

<p>How can i get the number of digits after the decimal point. </p>

<p><strong>Duplicate ?:</strong> I have checked already existing posts, but there is no correct way to handle the <strong><code>float</code></strong> numbers <strong><code>with or without decimal part</code></strong>.</p>

<p>Result</p>

<pre><code>Amount      Result
123         0
123.1       1
123.0123    4
123.789456  6
</code></pre>

<p><strong>EDIT</strong> : 
After spending some valuable time, i have found some relatively simple script to handle this. My answer is <a href="https://stackoverflow.com/questions/37024739/get-the-number-of-digits-after-the-decimal-point-of-a-float-with-or-without-dec/37027599#37027599">below</a></p>