Addition of Chart label formatting mask in Jasperreport

Asked

Viewed 278 times

0

I have a chart of lines and on the X axis it displays a series of dates. What I want to do is display date in the following pattern: dd/MM/yyyy because the same one is displaying in the format: yyyy-MM-dd. Dirt?

inserir a descrição da imagem aqui

  • It would not be better to treat directly in java?

1 answer

3


Direct by Jasper add to your label property :

new java.text.SimpleDateFormat("dd/MM/yyyy").format($F{sua data})

Via Java :

SimpleDateFormat formatter = new SimpleDateFormat("dd/MM/yyyy");

String dataFormatada = null;

dataFormatada = formatter.format("sua data hora");

Browser other questions tagged

You are not signed in. Login or sign up in order to post.