Solved

Convert money to nchar

Posted on 2016-09-08
4
61 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 44

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 44

Accepted Solution

by:
AndyAinscow earned 500 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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
VB.NET (2008) - Refactoring Question 2 21
Help with preventing downloading a zip file 10 37
C# LINQ ForEach() question 6 28
Problem with SelectList in .NET MVC application 1 18
This document covers how to connect to SQL Server and browse its contents.  It is meant for those new to Visual Studio and/or working with Microsoft SQL Server.  It is not a guide to building SQL Server database connections in your code.  This is mo…
Many of us here at EE write code. Many of us write exceptional code; just as many of us write exception-prone code. As we all should know, exceptions are a mechanism for handling errors which are typically out of our control. From database errors, t…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

832 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