Remove remaining decimals in TD

0
<div class="row-fluid">
<div class="span12"style="overflow-y:auto;">
    <h1 class="text-center" style="margin-bottom:1em;"><strong>Porcentaje Personal Capacitado</strong></h1>
    <table id="lista" class="table table-hover table-bordered bootstrap-datatable datatable dataTable">
            <caption></caption>
        <thead>
            <tr>
                <th>Mes</th>
                <th>Año</th>
                <th>Personal</th>
                <th>% mensual de capacitacion</th>

            </tr>
        </thead>
        <tbody>

  <%        for i = lbound(datos ,2) to ubound(datos ,2)%>

            <tr>

                <td><%=i+1%></td>
                <!--Descripción-->
                <td><%=datos(1,i)%></td>
                <!--Glosa-->
                <td><%=datos(2,i)%></td>
                <td><%=((datos(2,i)*100)/datos(3,i))%>%</td>
                <!--F Registro-->


            </tr>
   <%       next %>
        </tbody>
    </table>
</div>
</div>
 <%
end if

 Function UltimoDiaDeMes(iMonth, iYear)
 dim SDate,MesSiguiente
 SDate = DateSerial(iYear, iMonth, "01")
 MesSiguiente = DateAdd("m", 1, SDate)
 UltimoDiaDeMes = Day(DateAdd("d", -1, MesSiguiente))


 End Function
  %>

    
asked by Daniela 19.12.2018 в 16:26
source

1 answer

0

In the part that calculates the% uses Round (), its syntax is: Round(valor,decimales) Examples:
Round (2.1) devuelve 2 Round (2.8) devuelve 3 Round (41.2855,3) devuelve 41.286 Round (41.2009,2) devuelve 41.2 Round (41.2009,3) devuelve 41.201

Remaining the code in the part of the tr where% is calculated

<td><%=i+1%></td>
<!--Descripción-->
<td><%=datos(1,i)%></td>
<!--Glosa-->
<td><%=datos(2,i)%></td>
<td><%=Round(((datos(2,i)*100)/datos(3,i)),2)%>%</td>
<!--F Registro-->
    
answered by 19.12.2018 в 22:37