Jun 20, 2007 #1 Dimitrie1 Programmer Jan 5, 2007 138 CA Code: x = lblNewBalance2.Text lblNewBalance2.Text = String.Format("{0:c}", x) I am trying to display this value as $124.50. I get no errors yet it still displays 124.50 any ideas why
Code: x = lblNewBalance2.Text lblNewBalance2.Text = String.Format("{0:c}", x) I am trying to display this value as $124.50. I get no errors yet it still displays 124.50 any ideas why
Jun 20, 2007 #2 jbenson001 Programmer Jan 7, 2004 8,172 US x = lblNewBalance2.Text lblNewBalance2.Text = String.Format("{0:c}", CDbl(x)) Upvote 0 Downvote
Jun 20, 2007 Thread starter #3 Dimitrie1 Programmer Jan 5, 2007 138 CA I tried it but got the same result Upvote 0 Downvote
Jun 20, 2007 #4 jmeckley Programmer Jul 15, 2002 5,269 US should work Code: double x = Double.parse(lblNewBalance2.Text) lblNewBalance2.Text = String.Format("{0:c}", x) Jason Meckley Programmer Specialty Bakers, Inc. Upvote 0 Downvote
should work Code: double x = Double.parse(lblNewBalance2.Text) lblNewBalance2.Text = String.Format("{0:c}", x) Jason Meckley Programmer Specialty Bakers, Inc.
Jun 20, 2007 #5 jbenson001 Programmer Jan 7, 2004 8,172 US humm weird, worked for me.. This is exactly what I have Code: Dim x As String lblNewBalance2.Text = "124.50" x = lblNewBalance2.Text lblNewBalance2.Text = String.Format("{0:c}", CDbl(x)) Upvote 0 Downvote
humm weird, worked for me.. This is exactly what I have Code: Dim x As String lblNewBalance2.Text = "124.50" x = lblNewBalance2.Text lblNewBalance2.Text = String.Format("{0:c}", CDbl(x))
Jun 20, 2007 Thread starter #6 Dimitrie1 Programmer Jan 5, 2007 138 CA I know I have another field that works just fine. thanks Upvote 0 Downvote