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.
: FileMaker Specifications
FileMaker 8 Product Line
Specifications and Storage Limits
Field Types and Import/Export Formats
: Calculation Functions
Working with Calculations Primer
: Custom Functions
Custom Functions Primer
Useful Custom Functions
: Script Steps
Script Step Reference
: Quick Reference
FileMaker Error Codes
FileMaker Keyboard Shortcuts
FileMaker Network Ports
FileMaker Server Command Line Reference
FileMaker XML Reference
: Other Resources
Where to Go for More Information