FormatNumber - Syntax

Results 1 to 4 of 4

Thread: FormatNumber - Syntax

  1. #1
    Join Date
    Dec 1969
    Posts
    866

    Default FormatNumber - Syntax

    I need to format a number field(two position long) with leading &#0390&#039. I tried formatNumber, I guess I am making some<BR>syntax error. And it is not working.<BR><BR>Can anyone please let me know, what is the syntax for FormatNumber function to get a leading &#0390&#039<BR><BR>Much appreciated.<BR>

  2. #2
    Join Date
    Dec 1969
    Posts
    21

    Default RE: FormatNumber - Syntax

    Try trimming it before using the FormatNumber function

  3. #3
    Join Date
    Dec 1969
    Posts
    2,849

    Default RE: FormatNumber - Syntax

    Check out:<BR>http://msdn.microsoft.com/scripting/default.htm?/scripting/vbscript/doc/vsfctFormatNumber.htm<BR><BR>If you want a leading zero, you can do:<BR>Dim myNumber<BR>myNumber = 3<BR>Response.Write FormatNumber(myNumber, 0, -1)<BR><BR>Happy Programming!

  4. #4
    Join Date
    Dec 1969
    Posts
    866

    Default RE: FormatNumber - Not Working

    First Thank you both(JRD, SCOTT) for your responses. <BR><BR>Scott,<BR><BR>I already tried this out, and it is not working. <BR>Is it just some configuration issue or syntax issue. As you have given in your example, all I want to display is "03" instead of "3" (It is a two digit field)<BR><BR><BR>Thanks again for the response. <BR><BR>


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •