GetAsNumber()

 <  Day Day Up  >  

GetAsNumber()

Category: Text

Syntax: GetAsNumber ( text )

Parameters: text ”any valid text expression that contains numbers .

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

Examples:

 

 GetAsNumber ("abc123") 

Returns 123 .

 

 GetAsNumber ("0.10") 

Returns 100.1 .

Comments:

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)) 

would return 731689 when the date was 4/18/2004.

 <  Day Day Up  >  


QUE CORPORATION - Using Filemaker pro X
QUE CORPORATION - Using Filemaker pro X
ISBN: N/A
EAN: N/A
Year: 2003
Pages: 494

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net