Go Back   Velocity Reviews > Newsgroups > ASP Net
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply

ASP Net - Money format

 
Thread Tools Search this Thread
Old 06-09-2005, 12:54 AM   #1
Default Money format


I can't seem to get the money format (String.Format("{0:c}") to work for
data coming from my database.

If I do

WagesMin.Text = String.Format("{0:c}",10000))

This will put "$10,000.00" into WagesMin.Text.

But if I do this where WagesMin = 1,000.00

WagesMin.Text = String.Format("{0:c}",emailReader("WagesMin"))

I get 1,000.000. No formatting at all.

With Calculate a function that returns a Single, if I do:

WagesMin.Text =
String.Format("{0:c}",CalculateYearly(emailReader( "WagesMin")))

it would come back something like:

$230,000.00 (as I would expect)

Do I need to do some sort conversion for the emailReader("WagesMin") before
I do the String.Format?

Thanks,

Tom




tshad
  Reply With Quote
Old 06-10-2005, 07:18 AM   #2
TJS
 
Posts: n/a
Default Re: Money format
verify emailReader("WagesMin") is a string


"tshad" <> wrote in message
news:...
>I can't seem to get the money format (String.Format("{0:c}") to work for
>data coming from my database.
>
> If I do
>
> WagesMin.Text = String.Format("{0:c}",10000))
>
> This will put "$10,000.00" into WagesMin.Text.
>
> But if I do this where WagesMin = 1,000.00
>
> WagesMin.Text = String.Format("{0:c}",emailReader("WagesMin"))
>
> I get 1,000.000. No formatting at all.
>
> With Calculate a function that returns a Single, if I do:
>
> WagesMin.Text =
> String.Format("{0:c}",CalculateYearly(emailReader( "WagesMin")))
>
> it would come back something like:
>
> $230,000.00 (as I would expect)
>
> Do I need to do some sort conversion for the emailReader("WagesMin")
> before I do the String.Format?
>
> Thanks,
>
> Tom
>
>





TJS
  Reply With Quote
Old 11-03-2009, 03:23 AM   #3
lionstar
Junior Member
 
Join Date: Nov 2009
Posts: 1
Default
Excuse me! the CalculateYearly() exit in which library?


lionstar
lionstar is offline   Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Why No One Wins in the High-Def Format War Ablang DVD Video 50 11-04-2007 04:19 AM
MAKE FAST MONEY LEGALLY!!!!!!!!!!!!!!!!!! will_strip_4_banannas_boys@yahoo.com DVD Video 0 02-02-2006 07:03 PM
MAKE FAST MONEY LEGALLY!!!!!!!!!!!!!!!!!! will_strip_4_banannas_boys@yahoo.com DVD Video 0 02-02-2006 06:04 PM
As growth slows, Hollywood faces a DVD standoff. Allan DVD Video 0 07-11-2005 02:10 PM
High Definition and the future of viewing. Allan DVD Video 3 03-09-2005 12:56 AM




SEO by vBSEO 3.3.2 ©2009, Crawlability, Inc.

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