# vReport Html formatear fecha

**URL:** <https://foros.velneo.com/t/vreport-html-formatear-fecha/9961>\
**Category:** Velneo\
**Created:** [7 Octubre, 2018 15:52 UTC](https://foros.velneo.com/t/vreport-html-formatear-fecha/9961 "2018-10-07T15:52:37Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jmcorredoira](https://avatars.discourse-cdn.com/v4/letter/j/a698b9/32.png) [@jmcorredoira](https://foros.velneo.com/u/jmcorredoira)\
**Post date:** [7 Octubre, 2018 15:52 UTC](https://foros.velneo.com/t/vreport-html-formatear-fecha/9961/1 "2018-10-07T15:52:37Z")

</div>

En el vReport, si utilizo un campo html hay que poner  
“A la atención de:  
$D{#NAME}”,

Si quiero poner una fecha formateada como DD/mm/yyyy o que los campos numéricos tengan solo dos decimales.

¿Como se podría hacer eso ?

Gracias.

---

<div class="post-metadata">

**Author:** ![pacosatu](https://yyz1.discourse-cdn.com/flex035/user_avatar/foros.velneo.com/pacosatu/32/5131_2.png) [@pacosatu](https://foros.velneo.com/u/pacosatu)\
**Post date:** [13 Octubre, 2018 16:54 UTC](https://foros.velneo.com/t/vreport-html-formatear-fecha/9961/2 "2018-10-13T16:54:13Z")

</div>

Hola Manuel.

No es necesario usar $D{…}.  
En Tipo de origen del Item selecciona “Origen de datos” y usa una expresión de fórmula de Velneo.

Por ejemplo:

```
"<table border='1' style='border-color:green; border-style:solid; margin:0px;' align='center' width='100%' cellspacing='0' cellpadding='4' bgcolor='#f0fff0'>
<tr>
<td>" + #NOMBRE_COMPLETO + "</td><td>" + dateToString(currentDate(), "dd/MM/yyyy") + "</td><td>" + numberToString(2568/34.5, "L", 1) + "</td>
</tr>
</table>"

```

Pintará una tabla con 1 fila y 3 celdas.

Saludos  
Paco Satué
