|
-
Feb 1st, 2005, 08:13 AM
#1
Thread Starter
Member
help with formatting
hey all, ok i made a project that calculates the future value of an investment with the given interest, amount n years and i have it all calculated i made a calculate button for it and my future value answer is in a label and the other numbers needed are in text boxes and it all works i get the right answer but i was wonderin how u can make the future value answer be in a dollar format ?
-
Feb 1st, 2005, 08:25 AM
#2
PowerPoster
Re: help with formatting
Dim sCurrency As String =FormatCurrency(amount, TriState.True)
will display with leading currency sign (according to your computor's regional setting) and 000's separators (according to your computor's regional setting)
Taxes
The more I learn about VB.NET the more I like dBaseIII Plus
The foregoing, whilst believed to be correct, is given without guarantee as to it's accuracy and entirely without recourse. You are required to decide for yourself whether or not it is suitable for your purposes and no liability for loss of any nature can be entertained.
-
Feb 1st, 2005, 08:43 AM
#3
Sleep mode
Use CultureInfo class to get/specify current locale or use another's culture format . en stands for Language code and US for country .
visual basic code:
Dim curInfo AsNew CultureInfo("en-US")
Dim f AsDecimal = 12354.54
MessageBox.Show(f.ToString("C", curInfo))
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|