# How to remove right value from an integer

Posted by Karthik2010_Mca under C# on 1/2/2014 | Points: 10 | Views : 1729 | Status : [Member] | Replies : 10
Hi,

I have an integer value int a = 123456.789000123456
I want to remomve after ".0123456"

Result should be 123456.78900

Thanks

Karthik

#### Responses

Posted by: Allemahesh on: 1/2/2014 [Member] [MVP] Silver | Points: 25
 0 I have little confused.If you have number like this 487548.556585556666Then you need output as 487548.55658?Karthik2010_Mca, if this helps please login to Mark As Answer. | Alert Moderator
Posted by: kgovindarao523-21772 on: 1/2/2014 [Member] [MVP] Bronze | Points: 25
 0 Hi,int a = 123456.789000123456 this returns a syntax error.try like this.decimal b = 123456.789000123456M;decimal y = Math.Round(b, 5);OUTPUT of y 123456.78900 Thank you, GovindKarthik2010_Mca, if this helps please login to Mark As Answer. | Alert Moderator
Posted by: Pallubhosale on: 1/3/2014 [Member] Starter | Points: 25
 0 I want sql query which displaysds sum of fee coloumn according to selected year. Database fields r NRIC,file no, title, start date,enddate, fee, eg .. if I select year 2013 .. it will display total sum of fee for selected year 2013PallaviKarthik2010_Mca, if this helps please login to Mark As Answer. | Alert Moderator
Posted by: kgovindarao523-21772 on: 1/3/2014 [Member] [MVP] Bronze | Points: 25
 0 Hi,SELECT SUM(fee),startDate,endDate FROM YOURTABLEGROUP BY GROUPING SETS((startDate),(endDate))Having startDate like '%2013%' OR endDate like '%2013%'Thank you, GovindKarthik2010_Mca, if this helps please login to Mark As Answer. | Alert Moderator
Posted by: raghuavulapalli-25110 on: 1/3/2014 [Member] Starter | Points: 25
 0 Hi,SELECT startDate,SUM(fee) AS fee FROM YOURTABLEGROUP BY startDate Having startDate like '%2013%'ThanksRaghunathKarthik2010_Mca, if this helps please login to Mark As Answer. | Alert Moderator
Posted by: Bandi on: 1/3/2014 [Member] [MVP] Platinum | Points: 25