Information générale
Catégorie:
Codage, syntaxe et commandes
Hello Nadya.
>> I've checked old messages, but didn't find a solution for this problem: I need to find out the number of digits in a number. <<
Just to give you one more idea, if you have FoxTools loaded, you can use StrFilter() like so:
LEN( STRFILTER( TRANSFORM( MyNumericValue ), "0123456789" ) )
But this solution has the same limitation as the one Vlas suggested using CHRTRAN.
>> Say, I have 12.3456000 - the number of digits should be seven. <<
By my reckoning, there are 9 digits there if you include the trailing zero's. Or did you really mean the number of digits to the right of the decimal point? If this is the case, something like this should work:
LEN( GETWORDNUM( TRANSFORM( MyNumericValue ), 2, '.' ) )
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement