Monday, March 26, 2012

String/Number manip.

In the following line:
txtWage.Text = "$" & Trim(dataReader.GetValue(9).ToString)

It returns $20.0000 I only want it to return back $20.00 -- every search I've done in string manip. has shown me zilch.

Any suggestions?

txtWage.Text = Format(CDbl(Trim(dataReader.GetValue(9).ToString)), "currency")
I think you can use String.Format also to do the same thing, with the format of {0:c}

0 comments:

Post a Comment