If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Sybase > How to get Money type without decimal

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 09-13-11, 11:11
jainshasha jainshasha is offline
Registered User
 
Join Date: Sep 2011
Posts: 1
How to get Money type without decimal

Hi,

Does anyone help me how to format a decimal value in money format but without decimals

For eg
If the value is 12345678.123
ans should be
12,345,678

If i do the money format then decimal part will also be there but i dont want the decimal part.

Please help if there is any function in sybase.

Thanks
Reply With Quote
  #2 (permalink)  
Old 09-15-11, 10:37
eldeleon eldeleon is offline
Registered User
 
Join Date: Jun 2011
Posts: 17
Hello

You can just use somethin like this, for example if the value of your variable its $4.50 the result will be 4

Code:
select convert(int, $4.50)
I hope this helps you

Regards
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On