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

x
?
Solved

How to perform calculation

Posted on 2016-10-05
2
Medium Priority
?
47 Views
Last Modified: 2016-10-05
Hi,

I have a resulted value from db, such as

PricePerSqFt.Text = String.Format("{0:$#,##0.00}", reader["PSF"]);

Before I convert it into string, I need to perform some formula to the value, say, I want to * 100 to "PSF".  How can I do this?  thanks
0
Comment
Question by:mcrmg
2 Comments
 
LVL 20

Accepted Solution

by:
Russ Suter earned 2000 total points
ID: 41830633
Assuming the value of reader["PSF"] is a double?
PricePerSqFt.Text = String.Format("{0:$#,##0.00}", Convert.ToDouble(reader["PSF"]) * 100);

Open in new window

You can convert to other data types as needed.
0
 

Author Closing Comment

by:mcrmg
ID: 41830639
thank you
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

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

I recently went through the process of creating a Calendar Control of events with the basis of using a database to keep track of the dates that are selectable, one requirement was to have the selected date pop-up in a simple lightbox.  At first this…
Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
This Micro Tutorial will teach you how to add a cinematic look to any film or video out there. There are very few simple steps that you will follow to do so. This will be demonstrated using Adobe Premiere Pro CS6.
Integration Management Part 2
Suggested Courses

926 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