Professional Web Applications Themes

format currency - Microsoft SQL / MS SQL Server

Hello All & Greetings. Can someone pl tell me in a hurry how I can format a currency item in 2 decimal places. thanks in advance. RK...

Sponsored Links
  1. #1

    Default format currency

    Hello All & Greetings.

    Can someone pl tell me in a hurry how I can format a currency item in 2
    decimal places.

    thanks in advance.

    RK


    Sponsored Links
    RK Guest

  2. #2

    Default Re: format currency

    Here are some choices. Formatting in SQL Server is limited,
    since it is not intended to be a report generator.

    declare m money
    set m = 99999
    select convert(varchar(30), m, 1)
    select convert(varchar(30), m, 3)
    select cast(m as decimal(20,2))

    Steve Kass
    Drew University

    RK wrote:
    >Hello All & Greetings.
    >
    >Can someone pl tell me in a hurry how I can format a currency item in 2
    >decimal places.
    >
    >thanks in advance.
    >
    >RK
    >
    >
    >
    >
    Steve Kass Guest

  3. #3

    Default Re: format currency

    If your talking about displaying only 2 decimal places then take a look in
    BooksOnLine under CONVERT and go about half way down to see a chart of 3
    options for formatting currency.


    --

    Andrew J. Kelly
    SQL Server MVP


    "RK" <kishanbcansciences.com> wrote in message
    news:ei5Vju%23PDHA.3768tk2msftngp13.phx.gbl...
    > Hello All & Greetings.
    >
    > Can someone pl tell me in a hurry how I can format a currency item in 2
    > decimal places.
    >
    > thanks in advance.
    >
    > RK
    >
    >

    Andrew J. Kelly Guest

  4. #4

    Default Format Currency

    I was using a number stepper for currency and I am now switching the code to
    just a textInput. I am using the below code but if I set it this way it
    doesn't allow me to use a peroid to seperate my dollar amounts. Example if I
    type 3.22 it comes out as 322 I need it to allow the decimal

    <mx:TextInput id="TXTpostageTotal" text="{caseVO.postageTotal}"
    change="caseVO.postageTotal = Number(TXTpostageTotal.text);doUpdate();"/>

    nrutter Guest

Similar Threads

  1. Question Currency format null when = 0
    By Lulu in forum Brainstorming Area
    Replies: 0
    Last Post: November 17th, 09:49 PM
  2. How do I view currency field in format $xx.xx
    By Terry Murray in forum ASP Database
    Replies: 2
    Last Post: November 10th, 10:01 PM
  3. Format Currency in ASP?
    By jason in forum ASP
    Replies: 3
    Last Post: August 25th, 10:28 PM
  4. Format Textbox on exit to Currency
    By Patrick J. Schouten in forum ASP
    Replies: 4
    Last Post: July 14th, 11:17 AM
  5. format number into currency format ($1,000,000.00)
    By Aaron Bertrand - MVP in forum Microsoft SQL / MS SQL Server
    Replies: 0
    Last Post: July 11th, 06:31 PM

Bookmarks

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139