Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Convert money to nchar

Posted on 2016-09-08
4
Medium Priority
?
109 Views
Last Modified: 2016-09-08
Hi,


How to convert   3.1E+50  to  nvarchar

strInfield = 3.10000000000000000000000000000000000000000000000000000

 MyMoney = Convert.ToDouble(strInfield)

Now ,  mymoney = 3.1E+50
How to convert it to nvarchar


Cheers!
0
Comment
Question by:RIAS
  • 2
  • 2
4 Comments
 
LVL 45

Expert Comment

by:AndyAinscow
ID: 41789506
The strinfield is a string, in other words an nvarchar.  No conversion required.
0
 

Author Comment

by:RIAS
ID: 41789508
It does need Andy in the sql stored procedure
0
 
LVL 45

Accepted Solution

by:
AndyAinscow earned 2000 total points
ID: 41789547
It should not need converting.  At the most it might need truncating to fit the nvarchar.

If you want to convert a double to a string then
str = d.ToString(supply the format you want if default format is not suficient)
0
 

Author Closing Comment

by:RIAS
ID: 41789548
Cheers!
0

Featured Post

Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
Hello there! As a developer I have modified and refactored the unit tests which was written by fellow developers in the past. On the course, I have gone through various misconceptions and technical challenges when it comes to implementation. I would…
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
Loops Section Overview
Suggested Courses

972 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question