How to set the length of a string in label?

hello,
I want to display a float value in label…something like (1.52458) but it shouldn’t exceed more than 5…after decimal it should display only 5numbers…
can someone help me ???

thanks.

Hi @monisha,

Just try by using Floor

Math.floor(1.52458 * 100000) / 100000

Regards,
Gurudath

hi @gurudath,

thank u for replying…

what if I get a value above 5numbers…??

@monisha,

It will round up to 5 numbers.

E.g : Math.floor(1.524589123 100000) / 100000 = 1.52458*

@gurudath,

Thank you!