Category: Text

Syntax: GetAsNumber ( text )


textAny valid text expression that contains numbers.

Data type returned: Number


GetAsNumber() returns only the numbers from a text string, as a data type number. All non-numeric characters are dropped from the string.

Use GetAsNumber() to strip all non-numeric characters out of a text string. For instance, you might have a phone number field to which you want to apply some formatting. GetAsNumber (PhoneNumber) returns just the numeric characters from the field, stripping all punctuation and spaces, so that you can then apply whatever new formatting you wish.

GetAsNumber() can also be applied to date and time fields to coerce the data into its integer representation. For instance,

 GetAsNumber (Get (CurrentDate))

returns 731689 when the date is 4/18/2004.




GetAsNumber ("abc123")

Returns 123.

GetAsNumber ("$100.10")

Returns 100.1.

FileMaker 8 Functions and Scripts Desk Reference
FileMaker 8 Functions and Scripts Desk Reference
ISBN: 0789735113
EAN: 2147483647
Year: 2004
Pages: 352
Simiral book on Amazon © 2008-2017.
If you may any questions please contact us: