Whatever message this page gives is out now! Go check it out!

FormatBaseN

Last update:
May 18, 2026

Description

Converts number to a string, in the base specified by radix.

Returns

String that represents number, in the base radix.

Category

Function syntax

FormatBaseN(number, radix)

See also

Parameters

Parameter
Description
number
Number to convert
radix
Base of the result

Example

<cfoutput>
  (FormatBaseN(10,2)) is : 
  <cfscript>
      writeOutput(FormatBaseN(10,2)); //Result 1010
  </cfscript>

  <br>(FormatBaseN(1024,16)) is : 
  <cfscript>
      writeOutput(FormatBaseN(1024,16)); //Results 400
  </cfscript>
  
  <br>(FormatBaseN(125,10)) is : 
  <cfscript>
      writeOutput(FormatBaseN(125,10)); //Results 125
  </cfscript>
  
  <br>(FormatBaseN(10.75,2)) is : 
  <cfscript>
      writeOutput(FormatBaseN(10.75,2)); //Results 1010
  </cfscript>
</cfoutput>

Share this page

Was this page helpful?
We're glad. Tell us how this page helped.
We're sorry. Can you tell us what didn't work for you?
Thank you for your feedback. Your response will help improve this page.

On this page