.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Post New Web Links

Changing number format

Posted By:      Posted Date: December 04, 2010    Points: 0   Category :Sql Server

I receive price values in the format [100,00-]

this needs to be converted to -100000. 


I used a derived column with the function REPLACE([Column 0],",",".")

But, obviously the negative value is not being recognised. So I get [100000-]

Please advise.

Thank you.





View Complete Post

More Related Resource Links

Convert English to Arabic number without changing any regional settings in .net

Well, most applications that I worked with was multilingual that supports English UI and Arabic UI.

And one of the major issue that we have faced is displaying Arabic numbers without the need of changing the regional settings of the PC.

So the code below will help you to display Arabic number without changing any regional settings.

proper format for number column

Hi  In a column i have number datatype but after filling some no it's giving like that 23,786,23 (mostly like a currency format ) but i need like that 2378623 so give me suggestion how i can implement this in sharepoint 2010 , is there need to bound some column level validation for that ............... 

Format phone number in asp.net textbox control

Hi,  I have a <asp:textbox> control, I want to display text as a phone number format like phone number mask. Anybody can help on this. Thanks in advance.

format-number issues with the Data View Web Part in SharePoint 2010

I have a number column named @Year_x0020_1_x0020_Revenue in the data view web part in SharePoint Designer 2010. In the Xpath expression builder - @Year_x0020_1_x0020_Revenue previews "500,000" If I use the format-number in the Xpath expression builder ==> format-number(@Year_x0020_1_x0020_Revenue, '$#,##0.00;-$#,##0.00'), it returns NaN. Is there any reason? 

Changing Date format in Filter toolbar


i have added a toolbar to a Data View Web Part and enabled the Filter option. When i click on the filter, the Due Date field displays choices as Saturday, September 11, 2010. Within the DWVP I have the format set to mm/dd/yyyy, the differening formats seem to prevent the filter from working. How I can change the format in the filter dropdown ?

Thanks in advance

Dean MCTS-SQL 2005 Business Intelligence

Converting datetime to var``char without changing the format


Hi Team,

Is there a way to change the datetime to varchar without changing the format

like datetime '2009-09-28 00:00:00.000' after converting to varchar it should be in the same format



How to FORMAT a AVERAGE number


How can i write a similar query like this in TSQL?


this was written in SSRS

Changing grid to a color reflecting a number?


This is what I need


 This is what i have

How can i do this? I think thinking maybe something in the code behind that when it detects a 4,3 it would change it to a color. but im not sure.

Thanks for the help!


Changing Default Language for British Date Format




After reading several topics about Datetime formats from US-English to British, I got more confused.  I have successfully changed Default Language on my local machine's SQL Server Express using this:

EXEC sp_configure 'default language', '23' 

But I can't change it on a Server side.  It prompts me to run 'RECONFIGURE' again and when I do I am getting this error:

"Address Windowing Extensions (AWE) is not supported in this edition of SQL Server."


String.Format rounding down floating point number


Hi, I'm having an issue with String.Format, can somebody tell me if it's something I'm doing.


I'm using C# 2.0 I have code which looks a little bit like this:


Code Snippet

string result;

float floatToConvert = 10780503.000000f;


result = String.Format("{0:0,0}",floatToConvert);



Now I would expect result to have a value of "10,780,503" after this line of code, but it doesn't it has a value of "10,780,500"...


If however I do this:


Code Snippet

string result;

float floatToConvert = 10780503.000000f;

Format a number to show as 10.00


I feel really stupid but I just don't understand where I go wrong

All I try to do is to display 10 as 10.00

Dim amount As Double = 10
        lblAmount.Text = Format(amount, "##,##0.00")

And what I am getting is this


Please help


Hi Experts.... I'm trying to get Fiscal Weeks in the form of year + week number in 6 digit format b

CONVERT(int,(cast(datepart(year, AuditDate) as varchar) + (case when (datepart(WK , AuditDate) < 9) then '0' else '' end) + cast(datepart(WK , AuditDate) as varchar))) As 'FiscalWeekId' 

20069 > 200609
20069 > 20060

format the number in indian currency format


hi.... to all..

i'm using sql server 2008 express with advance edition with BIDS...

i've developed one report in that employee salary.. 

i want to print the salary in the format (12,34,56,78,91,01,11,233.89)

and i want to print in words

such as (" ninty  nine crores fifty one lakhs fourty nine thousand four hundred and fourty five rupees and seventy nine paise ")

i.e in crores and lakhs (indian currency format)...

please help me....


please correct the code (indian number format code)



The code is about place the comma's (,) i.e separator between numbers
in this format (12,21,21,123) it works good..
but when there's a decimal point such as 12345.58 it will show as 12,346.. 
it will round up the values.. ( which i dont want that .. i want as it value to be printed )
and one more problem  if there five digit with two decimal i.e(12345.00) it will show correct
i.e (12,345.00) but if i there four digit with two decimal i.e(1234.00 ) it will show this #error

Different Culture number format using a website


Hi All,

I have problem to showing numer format for different culture using browser in client side. I am explain here what i am facing the issue. 

For example,

I have a application which is installed in IIS7 at datacenter in Germany. Database is in Germany. After installing my application i will run my application in hosting server when i have set chines language in hosting server browser. Next it will works perfect for Indian and Chines languages in local browser. Because indian and chines language same decimal separater and thousand separater. 

My problem is, when i change german language in local browser then it won't work. Number format is showing wrong. For example, actual value is 5.5000. But it showing  55,0000. it should show 5,5000.

Please someone to help me to resolve this issue



Changing Date Format.




Currently I am using a shared sql server from My Hosting provider to send and receive some Data Fom my VB application. and as I am not an administrator i cant change the language. Even i can't access any sql properties.


but i want to change date format to dd-mm-yyyy instead of mm-dd-yyyy


Changing the graphics on the home page of a SharePoint site

When you create a site in Microsoft Windows SharePoint Services by using the default Team Site template, the home page includes two default graphics. A Windows SharePoint Services graphic appears in the body of the page, and a picture of a house in a circle appears near the site title. You can change these graphics to customize your site. Changing the smaller graphic requires a Windows SharePoint Services compatible Web page editor
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend