Solved

Convert money to nchar

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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

743 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now