User Id :    Password :      New Member   Forgot Password
 
Show money in international format in sql server
Description Codesnippet to show money in international format in sql server. For example converting 26583912.1254 number as 26,583,912.13 which is in international number format.   No. of Views     1109
  Rating     0
Author Najmul Hoda   Posted On     29 Oct 2011
Tags SQL SERVER    

Sample Code   Download Code

 

Sometimes we need to show money in international number format. For eamaple we store money as 26583912.1254 in the database but while showing it in reports we want to show it like 26,583,912.13 which is in international number format.

 

To convert money is international format here is the code.

 

DECLARE @Amount MONEY 
SET @Amount= 26583912.1254

SELECT @Amount 'Before converting to international number format'
SELECT CONVERT(VARCHAR,@Amount,1)'International number format'


OUTPUT

 

 

Hope it will help you.

Stay tuned for more... till then happy reading......

 

About Author

About Author He is a .Net developer having 4+ years of experience. He loves writting technical article for .Net developers. Najmul Hoda
No Photo
 
Country India
Company BirlaSoft
Home Page www.dotnetlogix.com

Rate this article

Rating options from poor, fair, good, very good to excelent.  
 

Comments

     
Write your comment here.  
Comment
Verification Code   
  
    
 
Section sponsored by