Click here to Skip to main content
15,895,777 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
how so i convert varchar to money -- datatype


i have one query of varchar to datetime

CONVERT (datetime,date,103) as updatedate


i need for varchar to money
Posted

THE ANSWER FOR CONVERTING VARCHAR TO MONEY --DATATYPE

1) SELECT convert(varchar(30), moneyfield, 1)
2)SELECT convert(int, round(moneyfield, 0))
3)SELECT convert(int, floor(moneyfield))
4)SELECT convert(int, ceiling(moneyfield)
 
Share this answer
 
Comments
10923679 5-Aug-14 1:06am    
its not working
Try:

SQL
CONVERT(VARCHAR(10),CONVERT(MONEY, yourfieldname))
 
Share this answer
 
Hi,

Try This...


SQL
SELECT CONVERT(MONEY,your_varchar_field)


Hope this will help you.


Cheers
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900