Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Convert money to nchar

Posted on 2016-09-08
4
Medium Priority
?
102 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 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

Veeam Task Manager for Hyper-V

Task Manager for Hyper-V provides critical information that allows you to monitor Hyper-V performance by displaying real-time views of CPU and memory at the individual VM-level, so you can quickly identify which VMs are using host resources.

Question has a verified solution.

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

Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…

661 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