Correct formatting for date

0

I am formatting the start date of a list according to the code below, and in the database the dates registered in "2018-11-01" and "2018-11-02" are being listed respectively with the dates in " 10/31/2018 "and" 01/11/2018 "on the screen.

code in frontend:

{{material.dataInicio | date: 'dd/MM/yyyy' }}

Note: All other dates are correct.

    
asked by anonymous 28.11.2018 / 18:46

1 answer

0

Try to format them via Java.

As in the example below:

 SimpleDateFormat dataFormatada = new SimpleDateFormat("dd/MM/yyyy"); 
      dataFormatada.format(SuaData)

On the front you get this String that the format method will provide you with

    
28.11.2018 / 22:22