Sunday, February 26, 2012

format for Convert

Hello,

SELECT name + '- ' + CONVERT(varchar,amt) as ddlCap from myTable

How can I get amt be like "#0.00" format in ddlCap?

Hi,

Please run the below statement to see if it is what you want...

SELECT
amt,
CONVERT(varchar(20),amt,0),
CONVERT(varchar(20),amt,1)
FROM myTable


Eralper
http://www.kodyaz.com

No comments:

Post a Comment