Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > Format output to currency

Reply
Thread Tools

Format output to currency

 
 
Micromanaged
Guest
Posts: n/a
 
      05-26-2004


In my response.write line, I need to format a field to be a currency
value. Is there a quick and dirty way to do it or is it an involved
edit? Here is my code:

Response.Write("<td>" & WhataRecordset.Fields.Item(0).Value &
"</td><td>" & WhataRecordset.Fields.Item(1).Value & _
"</td><td>" & WhataRecordset.Fields.Item(2).Value & "</td><td>" &
WhataRecordset.Fields.Item(3).Value & _
"</td><td>" & WhataRecordset.Fields.Item(4).Value & "</td><td>" &
WhataRecordset.Fields.Item(5).Value & _
"</td><td>" & WhataRecordset.Fields.Item(6).Value & "</td></tr>")

The value written out in WhataRecordset.Fields.Item(2) is a monetary
amount and should be formatted in the currency format.

Thanks in advance.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
 
Reply With Quote
 
 
 
 
Aaron Bertrand - MVP
Guest
Posts: n/a
 
      05-26-2004
Yes, have you tried the FormatCurrency() function?

--
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/




"Micromanaged" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>
>
> In my response.write line, I need to format a field to be a currency
> value. Is there a quick and dirty way to do it or is it an involved
> edit? Here is my code:
>
> Response.Write("<td>" & WhataRecordset.Fields.Item(0).Value &
> "</td><td>" & WhataRecordset.Fields.Item(1).Value & _
> "</td><td>" & WhataRecordset.Fields.Item(2).Value & "</td><td>" &
> WhataRecordset.Fields.Item(3).Value & _
> "</td><td>" & WhataRecordset.Fields.Item(4).Value & "</td><td>" &
> WhataRecordset.Fields.Item(5).Value & _
> "</td><td>" & WhataRecordset.Fields.Item(6).Value & "</td></tr>")
>
> The value written out in WhataRecordset.Fields.Item(2) is a monetary
> amount and should be formatted in the currency format.
>
> Thanks in advance.
>
> *** Sent via Developersdex http://www.developersdex.com ***
> Don't just participate in USENET...get rewarded for it!



 
Reply With Quote
 
 
 
 
Micromanaged
Guest
Posts: n/a
 
      05-26-2004


It just barely dawned on me stupid brain after I posted the question.
Long day and it is only half over.

Thanks, though.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Format Currency for label VB Programmer ASP .Net 2 09-14-2005 02:35 PM
Format DataItem 'inline' as Currency/String? D. Shane Fowlkes ASP .Net 1 06-09-2005 04:05 PM
convert output to currency format TJS ASP .Net 0 05-18-2005 09:04 PM
CompareValidator on currency figure in French format Biao Tang ASP .Net 0 04-28-2005 09:15 AM
Double to Currency Output Todd Shillam C++ 6 01-24-2005 08:17 PM



Advertisments