Visual Basic converting a decimal data type to a label with currency format


 
Thread Tools Search this Thread
Top Forums Programming Visual Basic converting a decimal data type to a label with currency format
# 1  
Old 07-28-2014
Visual Basic converting a decimal data type to a label with currency format

Here is the code that I am working with. I have tried several other things. any suggestions?

Code:
Lbl_Cost_Output.Text = (dDistance * dCostPerMile).ToString("C")

The label is formatted correctly in terms of value 0.00 but no dollar sign appears. Please let me know if you have any questions.

Last edited by joeyg; 07-29-2014 at 10:05 AM.. Reason: Please wrap commands and data in CodeTags
# 2  
Old 10-12-2014
Hi,

Well, one question: How is VB expected to guess the currency?
OK, two: Did you try passing in CultureInfo.CurrentCulture to give the thing some context?

Bye
Mysha
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Converting text files to xls through awk script for specific data format

Dear Friends, I am in urgent need for awk/sed/sh script for converting a specific data format (.txt) to .xls. The input is as follows: >gi|1234|ref| Query = 1 - 65, Target = 1677 - 1733 Score = 8.38, E = 0.6529, P = 0.0001513, GC = 46 fd sdfsdfsdfsdf fsdfdsfdfdfdfdfdf... (6 Replies)
Discussion started by: Amit1
6 Replies

2. Shell Programming and Scripting

[SOLVED] Converting data from one format to the other

Hi All, I need to convert an exel spreadsheet into a SAS dataset, and the following format change is needed. Please help, this is too complex for a biologist. Let me describe the input. 1st row is generation.1st column in keyword 'generation', starting 2nd column there are 5... (9 Replies)
Discussion started by: newbie83
9 Replies

3. Solaris

How to FTP (get multiple) unix files to windows using visual basic 6

How to FTP (get multiple) unix files to windows using visual basic 6. I am a list of files in my unix location, need to ftp those files to windows machine using Visual basic 6 or VBA macros. Thanks in Advance (3 Replies)
Discussion started by: sureshmani
3 Replies

4. Shell Programming and Scripting

Format Money/Currency (U.S.)

I have looked everywhere. Does bash have a money/currency format for output? Do I have to use awk or printf? Thank you (4 Replies)
Discussion started by: Ccccc
4 Replies

5. Windows & DOS: Issues & Discussions

Start An Hummingbird Exceed Shell With Visual Basic

Hi all. I have a script that I've finished on Solaris 10 recently. Now they want me to build a GUI for it with VB. This is my first endeavour with VB. I am using Visual Studio 2008 to write the GUI. The GUI is all done and has the string var 'Command' that I want to execute in the shell. ... (0 Replies)
Discussion started by: Grizzly
0 Replies

6. Programming

Connect to UNIX server with Visual Basic

Is there any possibility to develop an application using Visual Basic that connects to a unix server (using SSH) and run some commands? I will try to describe what i need : The user should enter the server adress, username and password! Than the user must enter some "filenames" and after... (10 Replies)
Discussion started by: SuperDuck
10 Replies

7. UNIX for Dummies Questions & Answers

Using FTP mget from Visual Basic Shell

Hi calling a batch file with FTP commands from Visual basing with Shell, it basically to copy files then delete them. The delete seems to work but the copy, it looks like the mget command doesn't have the complete information on where to copy the files. Here is the batch file content. Open... (2 Replies)
Discussion started by: Mario120560
2 Replies

8. Shell Programming and Scripting

converting the data type in unix shell script

I am writing a unix shell script that will extract records from table and write into a file. ====================================== #! /bin/ksh ############################ # AFI Monitor Script ############################ . /db2/uszlad48/sqllib/db2profile export... (5 Replies)
Discussion started by: kmanivan82
5 Replies

9. UNIX for Dummies Questions & Answers

converting a tabular format data to comma seperated data in KSH

Hi, Could anyone help me in changing a tabular format output to comma seperated file pls in K-sh. Its very urgent. E.g : username empid ------------------------ sri 123 to username,empid sri,123 Thanks, Hema:confused: (2 Replies)
Discussion started by: Hemamalini
2 Replies
Login or Register to Ask a Question