Name
IsNumeric
Synopsis
IsNumeric(string
)
Returns True
if the specified string can be
converted to a number or False
if it can’t.
Examples:
<CFOUTPUT> -1: #IsNumeric(-1)#<BR> 0: #IsNumeric(0)#<BR> 1234: #IsNumeric(1234)#<BR> 1,234,567,890: #IsNumeric('1,234,567,890')#<BR> $1234.99: #IsNumeric('$1234.99')#<BR> 08/15/1999: #IsNumeric('08/15/1999')#<BR> 7pm: #IsNumeric('7pm')#<BR> abcdef: #IsNumeric('abcdef')#<BR> true: #IsNumeric(true)#<BR> false: #IsNumeric(false)#<BR> yes: #IsNumeric('yes')#<BR> no: #IsNumeric('no')#<BR> as45sd-1: #IsNumeric('as45sd')#<BR> !@$%^: #IsNumeric('!@$%^')#<BR> 1234abcd: #IsNumeric('1234abcd')# </CFOUTPUT>
Get Programming ColdFusion now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.